mirror of
https://github.com/directus/directus.git
synced 2026-01-28 19:08:05 -05:00
fix batch editing for fields in groups (#12582)
This commit is contained in:
@@ -319,11 +319,13 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function apply(updates: { [field: string]: any }) {
|
||||
const updatableKeys = Object.keys(updates).filter((key) => {
|
||||
const field = props.fields?.find((field) => field.field === key);
|
||||
if (!field) return false;
|
||||
return field.schema?.is_primary_key || !isDisabled(field);
|
||||
});
|
||||
const updatableKeys = props.batchMode
|
||||
? Object.keys(updates)
|
||||
: Object.keys(updates).filter((key) => {
|
||||
const field = props.fields?.find((field) => field.field === key);
|
||||
if (!field) return false;
|
||||
return field.schema?.is_primary_key || !isDisabled(field);
|
||||
});
|
||||
|
||||
emit('update:modelValue', pick(assign({}, props.modelValue, updates), updatableKeys));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user