Skip to content

Commit

Permalink
fix(DropdownMenu/ContextMenu): correct bindings of checkbox items (#…
Browse files Browse the repository at this point in the history
…2921)

Co-authored-by: Benjamin Canac <[email protected]>
  • Loading branch information
EvertonWingert and benjamincanac authored Dec 16, 2024
1 parent 6fb426f commit 4c5a4fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/runtime/components/ContextMenuContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
</ContextMenu.Sub>
<ContextMenu.CheckboxItem
v-else-if="item.type === 'checkbox'"
:checked="item.checked"
:model-value="item.checked"
:disabled="item.disabled"
:text-value="get(item, props.labelKey as string)"
:class="ui.item({ class: [uiOverride?.item, item.class], color: item?.color })"
@update:checked="item.onUpdateChecked"
@update:model-value="item.onUpdateChecked"
@select="item.onSelect"
>
<ReuseItemTemplate :item="item" :index="index" />
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/components/DropdownMenuContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
</DropdownMenu.Sub>
<DropdownMenu.CheckboxItem
v-else-if="item.type === 'checkbox'"
:checked="item.checked"
:model-value="item.checked"
:disabled="item.disabled"
:text-value="get(item, props.labelKey as string)"
:class="ui.item({ class: [uiOverride?.item, item.class], color: item?.color })"
@update:checked="item.onUpdateChecked"
@update:model-value="item.onUpdateChecked"
@select="item.onSelect"
>
<ReuseItemTemplate :item="item" :index="index" />
Expand Down

0 comments on commit 4c5a4fb

Please sign in to comment.