Skip to content

Commit

Permalink
fix(web): changes are not detected for some group fields (#1199)
Browse files Browse the repository at this point in the history
fix: the logic of detect changes in group field
  • Loading branch information
caichi-t authored Jul 30, 2024
1 parent 6b80996 commit d72b93e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions web/src/components/molecules/Content/Form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,8 @@ const ContentForm: React.FC<Props> = ({
(changedValues: any) => {
const [key, value] = Object.entries(changedValues)[0];
if (checkIfSingleGroupField(key, value)) {
const [groupFieldKey, groupFieldValue] = Object.entries(initialFormValues[key])[0];
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const changedFieldValue = (value as any)[groupFieldKey];
const [groupFieldKey, changedFieldValue] = Object.entries(value as object)[0];
const groupFieldValue = initialFormValues[key][groupFieldKey];
if (
JSON.stringify(emptyConvert(changedFieldValue)) ===
JSON.stringify(emptyConvert(groupFieldValue))
Expand Down

0 comments on commit d72b93e

Please sign in to comment.