fix: update all fields default value

(cherry picked from commit 420ecb6147a0f9c37021f9c3a263a32c7ec1e819)
This commit is contained in:
Shariq Ansari 2025-05-07 18:18:14 +05:30 committed by Mergify
parent 5b42bcdf60
commit af32cdf27a

View File

@ -371,6 +371,10 @@ const fields = computed(() => {
)
})
const allFields = computed(() => {
return getFields()?.map((f) => getFieldObj(f)) || []
})
function getFieldObj(field) {
return {
...field,
@ -416,7 +420,7 @@ const toggleSelectRow = (row) => {
const addRow = () => {
const newRow = {}
fields.value?.forEach((field) => {
allFields.value?.forEach((field) => {
if (field.fieldtype === 'Check') {
newRow[field.fieldname] = false
} else {