Skip to content

Commit

Permalink
Merge pull request #30263 from TMisiukiewicz/fix/laggy-search-opening
Browse files Browse the repository at this point in the history
perf: improve performance when opening Search with cmd+k
mountiny authored Nov 1, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 1a4a38b + aeba274 commit fd89a41
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/pages/SearchPage.js
Original file line number Diff line number Diff line change
@@ -65,15 +65,13 @@ class SearchPage extends Component {
this.searchRendered = this.searchRendered.bind(this);
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);

const {recentReports, personalDetails, userToInvite} = OptionsListUtils.getSearchOptions(props.reports, props.personalDetails, '', props.betas);

this.state = {
searchValue: '',
recentReports,
personalDetails,
userToInvite,
recentReports: {},
personalDetails: {},
userToInvite: {},
};
}

@@ -186,6 +184,7 @@ class SearchPage extends Component {
<ScreenWrapper
includeSafeAreaPaddingBottom={false}
testID={SearchPage.displayName}
onEntryTransitionEnd={this.updateOptions}
>
{({didScreenTransitionEnd, safeAreaPaddingBottomStyle}) => (
<>

0 comments on commit fd89a41

Please sign in to comment.