File tree Expand file tree Collapse file tree
src/components/properties Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ )
66and adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 0.1.30] - 2025-10-03
9+
10+ ### Changed
11+ - Changed ` SingleSelectProperty ` and ` MultiSelectProperty ` to accept a label
12+
813## [ 0.1.29] - 2025-10-02
914
1015### Added
Original file line number Diff line number Diff line change 77 "url" : " git+https://github.com/helpwave/hightide.git"
88 },
99 "license" : " MPL-2.0" ,
10- "version" : " 0.1.29 " ,
10+ "version" : " 0.1.30 " ,
1111 "files" : [
1212 " dist"
1313 ],
Original file line number Diff line number Diff line change @@ -8,9 +8,14 @@ import type { FormTranslationType } from '../../localization/defaults/form'
88
99type TranslationType = FormTranslationType
1010
11+ type SelectPropertyOption = {
12+ value : string ,
13+ label ?: string ,
14+ }
15+
1116export type MultiSelectPropertyProps = Omit < PropertyBaseProps , 'icon' | 'input' | 'hasValue' | 'className' > & {
1217 values : string [ ] ,
13- options : string [ ] ,
18+ options : SelectPropertyOption [ ] ,
1419 onValuesChanged ?: ( value : string [ ] ) => void ,
1520}
1621
@@ -46,7 +51,11 @@ export const MultiSelectProperty = ({
4651 } )
4752 } }
4853 >
49- { options . map ( value => ( < SelectOption key = { value } value = { value } /> ) ) }
54+ { options . map ( option => (
55+ < SelectOption key = { option . value } value = { option . value } >
56+ { option . label ?? option . value }
57+ </ SelectOption >
58+ ) ) }
5059 </ MultiSelectChipDisplay >
5160 ) }
5261 />
Original file line number Diff line number Diff line change @@ -8,9 +8,14 @@ import type { FormTranslationType } from '../../localization/defaults/form'
88
99type SingleSelectPropertyTranslation = FormTranslationType
1010
11- export type SingleSelectPropertyProps = Omit < PropertyBaseProps , 'icon' | 'input' | 'hasValue' | 'className' > & {
11+ type SelectPropertyOption = {
1212 value : string ,
13- options : string [ ] ,
13+ label ?: string ,
14+ }
15+
16+ export type SingleSelectPropertyProps = Omit < PropertyBaseProps , 'icon' | 'input' | 'hasValue' | 'className' > & {
17+ value ?: string ,
18+ options : SelectPropertyOption [ ] ,
1419 onValueChanged ?: ( value : string ) => void ,
1520 onAddNew ?: ( value : string ) => void ,
1621}
@@ -45,7 +50,11 @@ export const SingleSelectProperty = ({
4550 )
4651 } }
4752 >
48- { options . map ( value => ( < SelectOption key = { value } value = { value } /> ) ) }
53+ { options . map ( option => (
54+ < SelectOption key = { option . value } value = { option . value } >
55+ { option . label ?? option . value }
56+ </ SelectOption >
57+ ) ) }
4958 </ Select >
5059 ) }
5160 />
You can’t perform that action at this time.
0 commit comments