diff --git a/src-docs/src/views/combo_box/async.js b/src-docs/src/views/combo_box/async.js index caddfee823ae..a0f1887e1c79 100644 --- a/src-docs/src/views/combo_box/async.js +++ b/src-docs/src/views/combo_box/async.js @@ -47,7 +47,9 @@ export default () => { setSelected(selectedOptions); }; - const onSearchChange = useCallback((searchValue) => { + const onSearchChange = useCallback((searchValue, hasMatchingOptions) => { + console.info({ searchValue, hasMatchingOptions }); + setLoading(true); setOptions([]); @@ -79,7 +81,7 @@ export default () => { // Create the option if it doesn't exist. if ( flattenedOptions.findIndex( - (option) => option.value.trim().toLowerCase() === normalizedSearchValue + (option) => option.label.trim().toLowerCase() === normalizedSearchValue ) === -1 ) { // Simulate creating this option on the server.