mirror of
https://github.com/directus/directus.git
synced 2026-01-27 03:08:09 -05:00
Prevent field flash on resize
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div :class="hidden ? 'half' : field.system.width">
|
||||
<div :class="field.system.width || 'full'">
|
||||
<v-menu attached close-on-content-click>
|
||||
<template #activator="{ toggle, active }">
|
||||
<v-input class="field" :class="{ hidden, active }" readonly @click="toggle">
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
v-for="field in sortedHiddenFields"
|
||||
:key="field.field"
|
||||
:field="field"
|
||||
hidden
|
||||
@toggle-visibility="toggleVisibility($event, 'hidden')"
|
||||
@edit="openFieldSetup(field)"
|
||||
/>
|
||||
|
||||
@@ -156,15 +156,14 @@ export const useFieldsStore = createStore({
|
||||
// Update locally first, so the changes are visible immediately
|
||||
this.state.fields = this.state.fields.map((field) => {
|
||||
if (field.collection === collectionKey && field.field === fieldKey) {
|
||||
return {
|
||||
...field,
|
||||
...updates,
|
||||
};
|
||||
return merge({}, field, updates);
|
||||
}
|
||||
|
||||
return field;
|
||||
});
|
||||
|
||||
|
||||
|
||||
// Save to API, and update local state again to make sure everything is in sync with the
|
||||
// API
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user