@@ -209,7 +209,7 @@ export type PicklistProps<MultiSelect extends boolean | undefined> = {
209
209
tooltip ?: ReactNode ;
210
210
tooltipIcon ?: string ;
211
211
elementRef ?: Ref < HTMLDivElement > ;
212
- buttonRef ?: Ref < HTMLButtonElement > ;
212
+ inputRef ?: Ref < HTMLInputElement > ;
213
213
dropdownRef ?: Ref < HTMLDivElement > ;
214
214
onValueChange ?: Bivariant <
215
215
(
@@ -251,7 +251,7 @@ export const Picklist: (<MultiSelect extends boolean | undefined>(
251
251
tooltip,
252
252
tooltipIcon,
253
253
elementRef : elementRef_ ,
254
- buttonRef : buttonRef_ ,
254
+ inputRef : inputRef_ ,
255
255
dropdownRef : dropdownRef_ ,
256
256
onSelect,
257
257
onComplete,
@@ -373,8 +373,8 @@ export const Picklist: (<MultiSelect extends boolean | undefined>(
373
373
374
374
const elRef = useRef < HTMLDivElement | null > ( null ) ;
375
375
const elementRef = useMergeRefs ( [ elRef , elementRef_ ] ) ;
376
- const comboboxElRef = useRef < HTMLButtonElement | null > ( null ) ;
377
- const buttonRef = useMergeRefs ( [ comboboxElRef , buttonRef_ ] ) ;
376
+ const comboboxElRef = useRef < HTMLInputElement | null > ( null ) ;
377
+ const inputRef = useMergeRefs ( [ comboboxElRef , inputRef_ ] ) ;
378
378
const dropdownElRef = useRef < HTMLDivElement | null > ( null ) ;
379
379
const dropdownRef = useMergeRefs ( [ dropdownElRef , dropdownRef_ ] ) ;
380
380
@@ -607,9 +607,9 @@ export const Picklist: (<MultiSelect extends boolean | undefined>(
607
607
className = 'slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right'
608
608
role = 'none'
609
609
>
610
- < button
611
- type = 'button '
612
- ref = { buttonRef }
610
+ < input
611
+ type = 'text '
612
+ ref = { inputRef }
613
613
role = 'combobox'
614
614
tabIndex = { disabled ? - 1 : 0 }
615
615
className = { inputClassNames }
@@ -624,9 +624,10 @@ export const Picklist: (<MultiSelect extends boolean | undefined>(
624
624
onKeyDown = { onKeyDown }
625
625
onBlur = { onBlur }
626
626
{ ...rprops }
627
- >
628
- < span className = 'slds-truncate' > { selectedItemLabel } </ span >
629
- </ button >
627
+ value = { selectedItemLabel }
628
+ readOnly
629
+ disabled = { disabled }
630
+ />
630
631
< Icon
631
632
containerClassName = 'slds-input__icon slds-input__icon_right'
632
633
category = 'utility'
0 commit comments