@@ -209,7 +209,7 @@ export type PicklistProps<MultiSelect extends boolean | undefined> = {
209209 tooltip ?: ReactNode ;
210210 tooltipIcon ?: string ;
211211 elementRef ?: Ref < HTMLDivElement > ;
212- buttonRef ?: Ref < HTMLButtonElement > ;
212+ inputRef ?: Ref < HTMLInputElement > ;
213213 dropdownRef ?: Ref < HTMLDivElement > ;
214214 onValueChange ?: Bivariant <
215215 (
@@ -251,7 +251,7 @@ export const Picklist: (<MultiSelect extends boolean | undefined>(
251251 tooltip,
252252 tooltipIcon,
253253 elementRef : elementRef_ ,
254- buttonRef : buttonRef_ ,
254+ inputRef : inputRef_ ,
255255 dropdownRef : dropdownRef_ ,
256256 onSelect,
257257 onComplete,
@@ -373,8 +373,8 @@ export const Picklist: (<MultiSelect extends boolean | undefined>(
373373
374374 const elRef = useRef < HTMLDivElement | null > ( null ) ;
375375 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_ ] ) ;
378378 const dropdownElRef = useRef < HTMLDivElement | null > ( null ) ;
379379 const dropdownRef = useMergeRefs ( [ dropdownElRef , dropdownRef_ ] ) ;
380380
@@ -607,9 +607,9 @@ export const Picklist: (<MultiSelect extends boolean | undefined>(
607607 className = 'slds-combobox__form-element slds-input-has-icon slds-input-has-icon_right'
608608 role = 'none'
609609 >
610- < button
611- type = 'button '
612- ref = { buttonRef }
610+ < input
611+ type = 'text '
612+ ref = { inputRef }
613613 role = 'combobox'
614614 tabIndex = { disabled ? - 1 : 0 }
615615 className = { inputClassNames }
@@ -624,9 +624,10 @@ export const Picklist: (<MultiSelect extends boolean | undefined>(
624624 onKeyDown = { onKeyDown }
625625 onBlur = { onBlur }
626626 { ...rprops }
627- >
628- < span className = 'slds-truncate' > { selectedItemLabel } </ span >
629- </ button >
627+ value = { selectedItemLabel }
628+ readOnly
629+ disabled = { disabled }
630+ />
630631 < Icon
631632 containerClassName = 'slds-input__icon slds-input__icon_right'
632633 category = 'utility'
0 commit comments