|
12 | 12 |
|
13 | 13 |
|
14 | 14 | import {AriaMenuProps, mergeProps, useFocusRing, useMenu, useMenuItem, useMenuSection, useMenuTrigger} from 'react-aria'; |
15 | | -import {BaseCollection, CollectionProps, ItemProps, ItemRenderProps, useCachedChildren, useCollection} from './Collection'; |
| 15 | +import {BaseCollection, CollectionProps, ItemProps, useCachedChildren, useCollection} from './Collection'; |
16 | 16 | import {MenuTriggerProps as BaseMenuTriggerProps, Node, TreeState, useMenuTriggerState, useTreeState} from 'react-stately'; |
17 | 17 | import {ButtonContext} from './Button'; |
18 | 18 | import {ContextValue, forwardRefType, Provider, SlotProps, StyleProps, useContextProps, useRenderProps, useSlot} from './utils'; |
@@ -169,14 +169,6 @@ function MenuSection<T>({section, className, style, ...otherProps}: MenuSectionP |
169 | 169 | ); |
170 | 170 | } |
171 | 171 |
|
172 | | -export interface MenuItemRenderProps extends ItemRenderProps { |
173 | | - /** |
174 | | - * Whether the item is currently selected. |
175 | | - * @selector [data-selected] |
176 | | - */ |
177 | | - isSelected: boolean |
178 | | -} |
179 | | - |
180 | 172 | interface MenuItemProps<T> { |
181 | 173 | item: Node<T> |
182 | 174 | } |
@@ -215,7 +207,8 @@ function MenuItem<T>({item}: MenuItemProps<T>) { |
215 | 207 | data-focused={states.isFocused || undefined} |
216 | 208 | data-focus-visible={isFocusVisible || undefined} |
217 | 209 | data-pressed={states.isPressed || undefined} |
218 | | - data-selected={states.isSelected || undefined}> |
| 210 | + data-selected={states.isSelected || undefined} |
| 211 | + data-selection-mode={state.selectionManager.selectionMode === 'none' ? undefined : state.selectionManager.selectionMode}> |
219 | 212 | <Provider |
220 | 213 | values={[ |
221 | 214 | [TextContext, { |
|
0 commit comments