From a711429cf03868f955808b4a556889545a9250e1 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Thu, 6 Jun 2024 20:01:22 +0400 Subject: [PATCH] FlatTermSelector: Update the term suggestion limit (#62359) Unlinked contributors: fcenteno, keenode. Co-authored-by: Mamaduka Co-authored-by: t-hamano --- .../src/components/post-taxonomies/flat-term-selector.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/components/post-taxonomies/flat-term-selector.js b/packages/editor/src/components/post-taxonomies/flat-term-selector.js index 109c6faf53b415..a558cc05f555d3 100644 --- a/packages/editor/src/components/post-taxonomies/flat-term-selector.js +++ b/packages/editor/src/components/post-taxonomies/flat-term-selector.js @@ -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',