Skip to content

Commit

Permalink
fix(ktable): mask delay of column visibility menu (#2382)
Browse files Browse the repository at this point in the history
  • Loading branch information
2eha0 committed Sep 11, 2024
1 parent 91fafba commit 3dbc773
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/KTable/ColumnVisibilityMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</template>

<script setup lang="ts">
import { ref, watch, onBeforeMount, onMounted, type PropType } from 'vue'
import { ref, watch, onBeforeMount, onMounted, type PropType, nextTick } from 'vue'
import type { TableHeader } from '@/types'
import { TableColumnsIcon } from '@kong/icons'
import KButton from '@/components/KButton/KButton.vue'
Expand Down Expand Up @@ -118,11 +118,11 @@ const handleDropdownToggle = (isOpen: boolean): void => {
// set scroll classes on open
if (isOpen && menuItemsRef.value) {
setTimeout(() => {
nextTick(() => {
if (menuItemsRef.value) {
setOverflowClass(menuItemsRef.value)
}
}, 500)
})
}
// reset the map if the dropdown is closed without applying changes
if (!isOpen && isDirty.value) {
Expand Down

0 comments on commit 3dbc773

Please sign in to comment.