Skip to content

Commit

Permalink
Fix linting issue on record-form
Browse files Browse the repository at this point in the history
  • Loading branch information
awensaunders committed Oct 20, 2024
1 parent 5dffccc commit 74bf634
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/javascript/components/record-form/form/record-form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function RecordForm({

const bindRecalculateFields = recalculateFields => {
bindedRecalculateFields.current = recalculateFields;
}
};

const buildValidationSchema = formSections => {
const schema = formSections.reduce((obj, item) => {
Expand Down Expand Up @@ -186,7 +186,7 @@ function RecordForm({
if (typeof bindedRecalculateFields.current === "function") {
bindedRecalculateFields.current();
}
})
});

const handleConfirm = onConfirm => {
onConfirm();
Expand All @@ -202,7 +202,6 @@ function RecordForm({
formikValues.current = values;
};


if (!isEmpty(initialValues) && !isEmpty(forms)) {
const validationSchema = buildValidationSchema(forms);
const handleOnSubmit = values => {
Expand Down Expand Up @@ -231,6 +230,7 @@ function RecordForm({
if (values) {
calculatedFields.forEach(field => {
const result = parseExpression(field.calculation.expression).evaluate(values);

if (values[field.name] !== result) {
setFieldValue(field.name, result, false);
}
Expand Down

0 comments on commit 74bf634

Please sign in to comment.