Skip to content

Commit

Permalink
FlatTermSelector: Update the term suggestion limit (#62359)
Browse files Browse the repository at this point in the history
Unlinked contributors: fcenteno, keenode.

Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
  • Loading branch information
3 people authored Jun 6, 2024
1 parent 0c6b868 commit b2e649f
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ import MostUsedTerms from './most-used-terms';
const EMPTY_ARRAY = [];

/**
* Module constants
* How the max suggestions limit was chosen:
* - Matches the `per_page` range set by the REST API.
* - Can't use "unbound" query. The `FormTokenField` needs a fixed number.
* - Matches default for `FormTokenField`.
*/
const MAX_TERMS_SUGGESTIONS = 20;
const MAX_TERMS_SUGGESTIONS = 100;
const DEFAULT_QUERY = {
per_page: MAX_TERMS_SUGGESTIONS,
_fields: 'id,name',
Expand Down

0 comments on commit b2e649f

Please sign in to comment.