Skip to content

Commit

Permalink
Remove redundant setState calls
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardost committed Oct 21, 2024
1 parent 1f239d3 commit 5e69387
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions client/components/domains/search-filters/dropdown-filters.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,13 @@ export class DropdownFilters extends Component {
};

handleFiltersReset = () => {
this.setState( {}, () => {
this.togglePopover( { discardChanges: false } );
this.props.onReset( 'tlds', 'exactSldMatchesOnly' );
} );
this.togglePopover( { discardChanges: false } );
this.props.onReset( 'tlds', 'exactSldMatchesOnly' );
};

handleFiltersSubmit = () => {
this.setState( {}, () => {
this.togglePopover( { discardChanges: false } );
this.hasFiltersChanged() && this.props.onSubmit();
} );
this.togglePopover( { discardChanges: false } );
this.hasFiltersChanged() && this.props.onSubmit();
};

hasFiltersChanged() {
Expand Down

0 comments on commit 5e69387

Please sign in to comment.