Browse Source

fix(gui-v2): avoid flickering menu while hiding

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3065/head
Pranav C 2 years ago
parent
commit
52a6527c9b
  1. 6
      packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue
  2. 2
      packages/nc-gui-v2/composables/useColumnCreateStore.ts

6
packages/nc-gui-v2/components/smartsheet-column/EditOrAdd.vue

@ -59,7 +59,11 @@ function onCancel() {
async function onSubmit() {
await addOrUpdate(reloadMetaAndData)
advancedOptions.value = false
// add delay to complete the minimize transition
setTimeout(() => {
advancedOptions.value = false
}, 500)
}
// create column meta if it's a new column

2
packages/nc-gui-v2/composables/useColumnCreateStore.ts

@ -174,7 +174,7 @@ const [useProvideColumnCreateStore, useColumnCreateStore] = createInjectionState
if (cdf) formState.value.cdf = formState.value.cdf || null
}
const addOrUpdate = async (onSuccess: () => {}) => {
const addOrUpdate = async (onSuccess: () => void) => {
try {
console.log(formState, validators)
if (!(await validate())) return

Loading…
Cancel
Save