diff --git a/.changeset/chilled-worms-develop.md b/.changeset/chilled-worms-develop.md index dcc9208b66..3bd0692ba3 100644 --- a/.changeset/chilled-worms-develop.md +++ b/.changeset/chilled-worms-develop.md @@ -5,4 +5,4 @@ "@nextui-org/system-rsc": patch --- -Fix onSelectionChange type incorrect +Fix onSelectionChange type incorrect (#2512) diff --git a/packages/components/menu/src/use-menu.ts b/packages/components/menu/src/use-menu.ts index 100269a792..85eda37321 100644 --- a/packages/components/menu/src/use-menu.ts +++ b/packages/components/menu/src/use-menu.ts @@ -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"; @@ -89,7 +86,7 @@ interface Props { /** * Handler that is called when the selection changes. */ - onSelectionChange?: (keys: SharedSelection) => any; + onSelectionChange?: (keys: SharedSelection) => void; } export type UseMenuProps = Props & diff --git a/packages/components/select/src/use-select.ts b/packages/components/select/src/use-select.ts index c38f2a8f26..ed762e412f 100644 --- a/packages/components/select/src/use-select.ts +++ b/packages/components/select/src/use-select.ts @@ -132,7 +132,7 @@ interface Props extends Omit, keyof SelectVariantPr /** * Handler that is called when the selection changes. */ - onSelectionChange?: (keys: SharedSelection) => any; + onSelectionChange?: (keys: SharedSelection) => void; } interface SelectData {