Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
  • Loading branch information
winchesHe committed Jun 28, 2024
1 parent 40f93f0 commit 8f263da
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .changeset/chilled-worms-develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"@nextui-org/system-rsc": patch
---

Fix onSelectionChange type incorrect
Fix onSelectionChange type incorrect (#2512)
11 changes: 4 additions & 7 deletions packages/components/menu/src/use-menu.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import {
useProviderContext,
type HTMLNextUIProps,
type PropGetter,
type SharedSelection,
} from "@nextui-org/system";
import type {HTMLNextUIProps, PropGetter, SharedSelection} from "@nextui-org/system";

import {useProviderContext} from "@nextui-org/system";
import {AriaMenuProps} from "@react-types/menu";
import {AriaMenuOptions} from "@react-aria/menu";
import {useAriaMenu} from "@nextui-org/use-aria-menu";
Expand Down Expand Up @@ -89,7 +86,7 @@ interface Props<T> {
/**
* Handler that is called when the selection changes.
*/
onSelectionChange?: (keys: SharedSelection) => any;
onSelectionChange?: (keys: SharedSelection) => void;
}

export type UseMenuProps<T = object> = Props<T> &
Expand Down
2 changes: 1 addition & 1 deletion packages/components/select/src/use-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ interface Props<T> extends Omit<HTMLNextUIProps<"select">, keyof SelectVariantPr
/**
* Handler that is called when the selection changes.
*/
onSelectionChange?: (keys: SharedSelection) => any;
onSelectionChange?: (keys: SharedSelection) => void;
}

interface SelectData {
Expand Down

0 comments on commit 8f263da

Please sign in to comment.