Skip to content

Commit

Permalink
fix: keyboard navigation when using selectable group activator
Browse files Browse the repository at this point in the history
  • Loading branch information
yuwu9145 committed May 22, 2024
1 parent 69f9fbc commit ff1e855
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('VListGroup', () => {

<VList>
<VListGroup>
{{ activator: props => <VListItem isOpen={ props.isOpen } value={ props.nestedId } title="Group" /> }}
{{ activator: props => <VListItem { ...props } title="Group" /> }}
</VListGroup>
</VList>
</CenteredGrid>
Expand Down
6 changes: 5 additions & 1 deletion packages/vuetify/src/labs/VTreeview/VTreeviewChildren.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,15 @@ export const VTreeviewChildren = genericComponent<new <T extends InternalListIte
<div>
<VCheckboxBtn
key={ item.value }
tabindex="-1"
modelValue={ slotProps.isSelected }
loading={ loading }
indeterminate={ slotProps.isIndeterminate }
onClick={ withModifiers(() => selectItem(slotProps.select, slotProps.isSelected), ['stop']) }
onKeydown={ (e: KeyboardEvent) => {
if (!['Enter', 'Space'].includes(e.key)) return
e.stopPropagation()
selectItem(slotProps.select, slotProps.isSelected)
}}
/>
</div>
)}
Expand Down

0 comments on commit ff1e855

Please sign in to comment.