diff --git a/CHANGELOG.md b/CHANGELOG.md index f1fc6703bd..0c5f0dd6e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Redirection to requested page after login in anonymous mode +- Update filter state on property change ([#1327](https://github.com/scm-manager/scm-manager/pull/1327)) - Diff view for svn now handles whitespaces in filenames properly ([1325](https://github.com/scm-manager/scm-manager/pull/1325)) - Validate new namespace on repository rename ([#1322](https://github.com/scm-manager/scm-manager/pull/1322)) diff --git a/scm-ui/ui-components/src/forms/FilterInput.tsx b/scm-ui/ui-components/src/forms/FilterInput.tsx index 9c77f50d0f..fad1611c00 100644 --- a/scm-ui/ui-components/src/forms/FilterInput.tsx +++ b/scm-ui/ui-components/src/forms/FilterInput.tsx @@ -59,6 +59,16 @@ class FilterInput extends React.Component { event.preventDefault(); }; + componentDidUpdate = ({ value: oldValue }: Props) => { + const { value: newValue } = this.props; + const { value: stateValue } = this.state; + if (oldValue !== newValue && newValue !== stateValue) { + this.setState({ + value: newValue || "" + }); + } + }; + render() { const { t, testId } = this.props; return (