diff --git a/CHANGELOG.md b/CHANGELOG.md index c54816557..bf658dbc2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Add the `endDateInputRef` prop to `DateRangeFilter` to access the end date element. Refs STSMACOM-859. * Remove unnecessary `aria-rowindex` in `ItemView` and `ItemEdit` components. Fixes STSMACOM-871. * Check for `active` status of `` navigation links independently from the applied href and query string. Query string should only be applied to active link. Refs STSMACOM-837. +* `` use `lodash.isEmpty` to check for empty `state.status` in re-initialization checks on component update. Fixes STSMACOM-876. ## [9.2.3] IN PROGRESS diff --git a/lib/EditableList/EditableListForm.js b/lib/EditableList/EditableListForm.js index 3a0128c74..eaf485182 100644 --- a/lib/EditableList/EditableListForm.js +++ b/lib/EditableList/EditableListForm.js @@ -244,7 +244,7 @@ class EditableListForm extends React.Component { // needed for instances where initialValues arrive AFTER initialization. static getDerivedStateFromProps(props, state) { - if (!state.status) { + if (isEmpty(state.status)) { return { status: buildStatusArray(props.initialValues.items) }; diff --git a/yarn.lock b/yarn.lock index f5cf665dc..acf814c6c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1887,7 +1887,7 @@ lodash "^4.17.4" query-string "^7.1.2" -"@folio/stripes-webpack@5.2.100000625", "@folio/stripes-webpack@^5.0.0": +"@folio/stripes-webpack@^5.0.0": version "5.2.100000625" resolved "https://repository.folio.org/repository/npm-folioci/@folio/stripes-webpack/-/stripes-webpack-5.2.100000625.tgz#c849d77041e557514986a1b1fc2cd94b1f2a9255" integrity sha512-HKcrWmLvqTc7ntC8RqGKi/h0W8844/EcZ1Cm7k6IEDfai0UOXUepe4cKjK8G898i0q0+tnAA7q1T0LOZE/YKHA==