Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions framework/core/js/src/common/SearchManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ export default class SearchManager<State extends SearchState = SearchState> {
*/
public static MIN_SEARCH_LEN = 3;

/**
* Time to wait (in milliseconds) after the user stops typing before triggering a search.
*/
public static SEARCH_DEBOUNCE_TIME_MS = 250;

/**
* An object which stores previously searched queries and provides convenient
* tools for retrieving and managing search values.
Expand Down
2 changes: 1 addition & 1 deletion framework/core/js/src/common/components/SearchModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ export default class SearchModal<CustomAttrs extends ISearchModalAttrs = ISearch

this.searchState.cache(query);
m.redraw();
}, 250);
}, SearchManager.SEARCH_DEBOUNCE_TIME_MS);
}

/**
Expand Down
Loading