Skip to content

Commit 9a5b41a

Browse files
authored
Merge pull request #651 from code16/disable-state-dropdown-when-reordering
Disable state dropdown when reordering
2 parents bcfa758 + c595230 commit 9a5b41a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

resources/js/entity-list/components/EntityList.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,12 @@
736736
<template v-if="field.type === 'state'">
737737
<DropdownMenu>
738738
<DropdownMenuTrigger as-child>
739-
<Button class="relative z-10 disabled:opacity-100 -mx-3 hover:bg-transparent aria-expanded:bg-transparent" variant="ghost" size="sm" :disabled="!entityList.instanceCanUpdateState(item)" :aria-label="__('sharp::entity_list.state_dropdown.aria_label', { current_state_label: entityList.instanceStateValue(item)?.label })">
739+
<Button class="relative z-10 disabled:opacity-100 -mx-3 hover:bg-transparent aria-expanded:bg-transparent"
740+
variant="ghost"
741+
size="sm"
742+
:disabled="!entityList.instanceCanUpdateState(item) || reordering || selecting"
743+
:aria-label="__('sharp::entity_list.state_dropdown.aria_label', { current_state_label: entityList.instanceStateValue(item)?.label })"
744+
>
740745
<StateBadge :state-value="entityList.instanceStateValue(item)">
741746
{{ entityList.instanceStateValue(item)?.label }}
742747
</StateBadge>
@@ -758,7 +763,7 @@
758763
<template v-else-if="field.type === 'badge'">
759764
<template v-if="entityList.instanceHasBadge(item, field)">
760765
<TooltipProvider>
761-
<Tooltip :disabled="!field.tooltip" :delay-duration="0">
766+
<Tooltip :disabled="!field.tooltip || reordering || selecting" :delay-duration="0">
762767
<TooltipTrigger as-child>
763768
<div :class="field.tooltip ? 'relative z-2' : ''">
764769
<template v-if="field.tooltip">

0 commit comments

Comments
 (0)