Skip to content

Commit

Permalink
fix: fix for cancel multiple section
Browse files Browse the repository at this point in the history
  • Loading branch information
gokulrajtm committed Aug 22, 2024
1 parent adee54e commit f5cba12
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/crayons-extended/custom-objects/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,13 @@
}
}
});
const fieldIndex = field.fields.findIndex(field => field.id === objDetail.value?.id);

// If the field is found, remove it from the fields array
if (fieldIndex !== -1) {
field.fields.splice(fieldIndex, 1);
}

}
});
}
Expand Down Expand Up @@ -919,7 +926,6 @@
const objField = arrFields.splice(intSourceIndex, 1)[0];
arrFields.splice(intTargetIndex, 0, objField);
}
console.log(arrFields,"array")
objFormValues = { ...objFormValues, fields: arrFields };
setFormValues(objFormValues);
fb.formValues = objFormValues;
Expand Down

0 comments on commit f5cba12

Please sign in to comment.