Browse Source

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

pull/8188/head
Ramesh Mane 8 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. 5
      packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue

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

@ -97,7 +97,7 @@ const onArrowUp = () => {
<template> <template>
<div <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-down.prevent="onArrowDown"
@keydown.arrow-up.prevent="onArrowUp" @keydown.arrow-up.prevent="onArrowUp"
@keydown.enter.prevent="onClick(options[activeFieldIndex])" @keydown.enter.prevent="onClick(options[activeFieldIndex])"

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

@ -94,7 +94,7 @@ const onArrowUp = () => {
<template> <template>
<div <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-down.prevent="onArrowDown"
@keydown.arrow-up.prevent="onArrowUp" @keydown.arrow-up.prevent="onArrowUp"
@keydown.enter.prevent="onClick(options[activeFieldIndex])" @keydown.enter.prevent="onClick(options[activeFieldIndex])"

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

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

Loading…
Cancel
Save