diff --git a/src/dropdown.tsx b/src/dropdown.tsx index 3f6c29e..0368c48 100644 --- a/src/dropdown.tsx +++ b/src/dropdown.tsx @@ -55,7 +55,7 @@ function Dropdown(props: DropdownProps, ref: React.Ref) { })); const resetMenu = useCallback(() => { - onSelect?.(''); + onSelect?.(undefined); toggleMenu(); }, [onSelect, toggleMenu]); diff --git a/src/multi-select-dropdown.tsx b/src/multi-select-dropdown.tsx index eed4d3e..5f0470d 100644 --- a/src/multi-select-dropdown.tsx +++ b/src/multi-select-dropdown.tsx @@ -20,7 +20,7 @@ function MultiSelectDropdown( label, menuUpIcon = , menuDownIcon = , - value = [], + value, menuContentStyle = { paddingVertical: 0 }, maxMenuHeight, statusBarHeight = Platform.OS === 'android' diff --git a/src/types.ts b/src/types.ts index b80de7d..201a8f8 100644 --- a/src/types.ts +++ b/src/types.ts @@ -44,7 +44,7 @@ export type DropdownProps = { export type MultiSelectDropdownProps = { testID?: string; menuTestID?: string; - value?: string[]; + value: string[]; options: Option[]; menuUpIcon?: JSX.Element; menuDownIcon?: JSX.Element;