fix: do not show non value fields in dropdown

(cherry picked from commit f947f55fc6ba5c54242c7cea9ba5ea49c21d83fa)
This commit is contained in:
Shariq Ansari 2025-05-07 19:05:10 +05:30 committed by Mergify
parent c7e24d6760
commit 138c1341a6

View File

@ -139,9 +139,14 @@ const oldFields = computed(() => {
const fields = ref(JSON.parse(JSON.stringify(oldFields.value || [])))
const dropdownFields = computed(() => {
return getFields()?.filter(
(field) => !fields.value.find((f) => f.fieldname === field.fieldname),
)
return getFields()?.filter((field) => {
return (
!fields.value.find((f) => f.fieldname === field.fieldname) &&
!['Tab Break', 'Section Break', 'Column Break', 'Table'].includes(
field.fieldtype,
)
)
})
})
function reset() {