File tree Expand file tree Collapse file tree 1 file changed +4
-16
lines changed
src/components/fields/ComboBox Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -332,23 +332,11 @@ export const ComboBox = forwardRef(function ComboBox<T extends object>(
332332 let clearValue = useEvent ( ( ) => {
333333 if ( props . allowsCustomValue ) {
334334 props . onInputChange ?.( '' ) ;
335- // If state has a setInputValue method, use it as well
336- if (
337- 'setInputValue' in state &&
338- typeof state . setInputValue === 'function'
339- ) {
340- state . setInputValue ( '' ) ;
341- }
342- } else {
343- props . onSelectionChange ?.( null ) ;
344- // If state has a setSelectedKey method, use it as well
345- if (
346- 'setSelectedKey' in state &&
347- typeof state . setSelectedKey === 'function'
348- ) {
349- state . setSelectedKey ( null ) ;
350- }
335+ state . setInputValue ( '' ) ;
351336 }
337+ props . onSelectionChange ?.( null ) ;
338+ state . setSelectedKey ( null ) ;
339+
352340 // Close the popup if it's open
353341 if ( state . isOpen ) {
354342 state . close ( ) ;
You can’t perform that action at this time.
0 commit comments