Skip to content

Commit

Permalink
remove debounce from SearchPage
Browse files Browse the repository at this point in the history
  • Loading branch information
TMisiukiewicz committed Dec 15, 2023
1 parent 953e729 commit 7ccef7e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pages/SearchPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class SearchPage extends Component {
this.selectReport = this.selectReport.bind(this);
this.onChangeText = this.onChangeText.bind(this);
this.updateOptions = this.updateOptions.bind(this);
this.debouncedUpdateOptions = _.debounce(this.updateOptions.bind(this), 75);
this.state = {
searchValue: '',
recentReports: {},
Expand All @@ -85,7 +84,7 @@ class SearchPage extends Component {

onChangeText(searchValue = '') {
Report.searchInServer(searchValue);
this.setState({searchValue}, this.debouncedUpdateOptions);
this.setState({searchValue}, this.updateOptions);
}

/**
Expand Down Expand Up @@ -190,7 +189,6 @@ class SearchPage extends Component {
<View style={[this.props.themeStyles.flex1, this.props.themeStyles.w100, this.props.themeStyles.pRelative]}>
<OptionsSelector
sections={sections}
value={this.state.searchValue}
onSelectRow={this.selectReport}
onChangeText={this.onChangeText}
headerMessage={headerMessage}
Expand Down

0 comments on commit 7ccef7e

Please sign in to comment.