File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {ActionListProps, ListContext} from './List'
13
13
import { Selection } from './Selection'
14
14
import { ActionListItemProps , getVariantStyles , ItemContext , TEXT_ROW_HEIGHT } from './shared'
15
15
import { LeadingVisual , TrailingVisual } from './Visuals'
16
+ import { GroupContext } from './Group'
16
17
17
18
const LiBox = styled . li < SxProp > ( sx )
18
19
@@ -39,8 +40,11 @@ export const Item = React.forwardRef<HTMLLIElement, ActionListItemProps>(
39
40
} )
40
41
const { variant : listVariant , showDividers, selectionVariant : listSelectionVariant } = React . useContext ( ListContext )
41
42
const { container, afterSelect, selectionAttribute} = React . useContext ( ActionListContainerContext )
43
+ const { selectionVariant : groupSelectionVariant } = React . useContext ( GroupContext )
42
44
43
- const selectionVariant : ActionListProps [ 'selectionVariant' ] = listSelectionVariant
45
+ const selectionVariant : ActionListProps [ 'selectionVariant' ] = groupSelectionVariant
46
+ ? groupSelectionVariant
47
+ : listSelectionVariant
44
48
45
49
/** Infer item role based on the container */
46
50
let itemRole : ActionListItemProps [ 'role' ]
You can’t perform that action at this time.
0 commit comments