@konturio/ui-kit
Advanced tools
Comparing version 3.0.0-alpha.67 to 3.0.0-alpha.68
{ | ||
"name": "@konturio/ui-kit", | ||
"version": "3.0.0-alpha.67", | ||
"version": "3.0.0-alpha.68", | ||
"repository": { | ||
@@ -32,3 +32,3 @@ "type": "git", | ||
}, | ||
"gitHead": "6fbb7e874859cbb727f2ca08a6618663d524f1e3" | ||
"gitHead": "425d6654346f95eb8db04360e4ebbd14398919ee" | ||
} |
@@ -15,3 +15,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { AutocompleteButton } from './components/AutocompleteButton'; | ||
import { useCombobox } from 'downshift'; | ||
import { useCombobox, UseComboboxStateChangeTypes } from 'downshift'; | ||
import { AutocompleteItem } from './components/AutocompleteItem'; | ||
@@ -53,3 +53,9 @@ import cn from 'clsx'; | ||
setSelectedItem(defaultSelectedItem || null); | ||
}, [setSelectedItem, defaultSelectedItem]); | ||
if (onChange && typeof onChange === 'function') { | ||
onChange({ selectedItem: defaultSelectedItem || null, type: UseComboboxStateChangeTypes.FunctionReset }); | ||
} | ||
if (onSelect && typeof onSelect === 'function') { | ||
onSelect(defaultSelectedItem || null); | ||
} | ||
}, [setSelectedItem, defaultSelectedItem, onChange, onSelect]); | ||
const { isOpen, getToggleButtonProps, getLabelProps, getMenuProps, getComboboxProps, getInputProps, highlightedIndex, getItemProps, } = useCombobox({ | ||
@@ -56,0 +62,0 @@ items: filteredItems, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
394105
7006