mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-21 15:02:17 +01:00
Merge pull request #1327 from scm-manager/bugfix/repository-search-reset
update filter value on props change
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
@@ -59,6 +59,16 @@ class FilterInput extends React.Component<Props, State> {
|
||||
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 (
|
||||
|
||||
Reference in New Issue
Block a user