Browse Source

fix(nc-gui): reduce groupby & sort toolbar menu dropdown size & clear field menu search on open dropdown

pull/8188/head
Ramesh Mane 9 months ago
parent
commit
ca9ba8b430
  1. 2
      packages/nc-gui/components/smartsheet/toolbar/CreateGroupBy.vue
  2. 2
      packages/nc-gui/components/smartsheet/toolbar/CreateSort.vue
  3. 11
      packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue

2
packages/nc-gui/components/smartsheet/toolbar/CreateGroupBy.vue

@ -97,7 +97,7 @@ const onArrowUp = () => {
<template>
<div
class="flex flex-col w-full pt-2 w-80 nc-group-by-create-modal"
class="flex flex-col w-full pt-2 w-64 nc-group-by-create-modal"
@keydown.arrow-down.prevent="onArrowDown"
@keydown.arrow-up.prevent="onArrowUp"
@keydown.enter.prevent="onClick(options[activeFieldIndex])"

2
packages/nc-gui/components/smartsheet/toolbar/CreateSort.vue

@ -94,7 +94,7 @@ const onArrowUp = () => {
<template>
<div
class="flex flex-col w-full pt-2 w-80 nc-sort-create-modal"
class="flex flex-col w-full pt-2 w-64 nc-sort-create-modal"
@keydown.arrow-down.prevent="onArrowDown"
@keydown.arrow-up.prevent="onArrowUp"
@keydown.enter.prevent="onClick(options[activeFieldIndex])"

11
packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue

@ -305,11 +305,12 @@ const isDragging = ref<boolean>(false)
const fieldsMenuSearchRef = ref<HTMLInputElement>()
watch(open, (value) => {
if (value) {
setTimeout(() => {
fieldsMenuSearchRef.value?.focus()
}, 100)
}
if (!value) return
filterQuery.value = ''
setTimeout(() => {
fieldsMenuSearchRef.value?.focus()
}, 100)
})
useMenuCloseOnEsc(open)

Loading…
Cancel
Save