Skip to content

Commit

Permalink
STSMACOM-860 Fix <DateRangeFilter> validation errors disappear when…
Browse files Browse the repository at this point in the history
… another facet value changes
  • Loading branch information
BogdanDenis committed Oct 17, 2024
1 parent aa0f86a commit 37e5e45
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* Avoid deprecated `defaultProps` for functional components. Refs STSMACOM-835.
* Upgrade `notes` to `v4.0`. Refs STSMACOM-861.
* Improve confirmation modal footer for `ControlledVocab` component. Refs STSMACOM-863.
* Fix `<DateRangeFilter>` validation errors disappear when another facet value changes. Fixes STSMACOM-860.

## [9.1.3](https://github.com/folio-org/stripes-smart-components/tree/v9.1.3) (2024-05-06)
[Full Changelog](https://github.com/folio-org/stripes-smart-components/compare/v9.1.2...v9.1.3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,12 @@ const TheComponent = ({

React.useEffect(() => {
setFilterValue({
...getInitialValidationData(selectedValues, dateFormat, requiredFields),
selectedValues
...getInitialValidationData(selectedValuesState, dateFormat, requiredFields),
selectedValues: selectedValuesState,
});
}, [selectedValues, dateFormat, requiredFields]);

// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedValues.startDate, selectedValues.endDate, dateFormat, requiredFields]);

return (
<>
Expand Down

0 comments on commit 37e5e45

Please sign in to comment.