From 3a7039f4fa1bc7d9d57da41d97175bfe40b10693 Mon Sep 17 00:00:00 2001 From: Yash raj chhabra <95337653+yrchhabra-eightfold@users.noreply.github.com> Date: Thu, 7 Apr 2022 21:30:29 +0530 Subject: [PATCH] fix: handle menu item value type (#44) --- src/components/Menu/Menu.types.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/components/Menu/Menu.types.ts b/src/components/Menu/Menu.types.ts index 5b3d7c099..6ef57e878 100644 --- a/src/components/Menu/Menu.types.ts +++ b/src/components/Menu/Menu.types.ts @@ -1,14 +1,7 @@ import { ButtonProps } from '../Button'; import { ListProps } from '../List'; -export type MenuValue = string | number | boolean; - -export interface MenuItem extends Omit { - /** - * Unique value of the menu item - */ - value: MenuValue; -} +export interface MenuItem extends Omit {} export interface MenuProps extends Omit, 'renderItem' | 'role' | 'itemRole'> { @@ -21,5 +14,7 @@ export interface MenuProps * On change callback when menu item is clicked * @param value {MenuItem} */ - onChange?: (value: MenuValue) => void; + onChange?: ( + value: string | ReadonlyArray | number | undefined + ) => void; }