Skip to content

Commit

Permalink
fix reset menu value
Browse files Browse the repository at this point in the history
  • Loading branch information
fateh999 committed Aug 2, 2024
1 parent 893a4f4 commit 8385c83
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function Dropdown(props: DropdownProps, ref: React.Ref<DropdownRef>) {
}));

const resetMenu = useCallback(() => {
onSelect?.('');
onSelect?.(undefined);
toggleMenu();
}, [onSelect, toggleMenu]);

Expand Down
2 changes: 1 addition & 1 deletion src/multi-select-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function MultiSelectDropdown(
label,
menuUpIcon = <TextInput.Icon icon={'menu-up'} pointerEvents="none" />,
menuDownIcon = <TextInput.Icon icon={'menu-down'} pointerEvents="none" />,
value = [],
value,
menuContentStyle = { paddingVertical: 0 },
maxMenuHeight,
statusBarHeight = Platform.OS === 'android'
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8385c83

Please sign in to comment.