mirror of
https://github.com/directus/directus.git
synced 2026-01-28 04:58:07 -05:00
Fix filter added twice and remove unnecessary _and node. (#9116)
This commit is contained in:
@@ -112,10 +112,16 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
set(newVal) {
|
||||
if (newVal.length === 0) {
|
||||
emit('input', null);
|
||||
} else {
|
||||
emit('input', { _and: newVal });
|
||||
switch (newVal.length) {
|
||||
case 0:
|
||||
emit('input', null);
|
||||
break;
|
||||
case 1:
|
||||
emit('input', newVal[0]);
|
||||
break;
|
||||
default:
|
||||
emit('input', { _and: newVal });
|
||||
break;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@@ -381,7 +381,7 @@ export default defineComponent({
|
||||
|
||||
const field = currentCollection.value.meta.archive_field;
|
||||
|
||||
if (!field) return filter.value;
|
||||
if (!field) return null;
|
||||
|
||||
let archiveValue: any = currentCollection.value.meta.archive_value;
|
||||
if (archiveValue === 'true') archiveValue = true;
|
||||
|
||||
Reference in New Issue
Block a user