From ed46eac27241b5fb5a4853cb1cbb7f00f788790b Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Wed, 24 Jan 2024 11:34:06 +0000 Subject: [PATCH] Show initial suggestions in rich text Link UI (#57743) * Show suggestions for rich text links * Set default search query for initial suggestions to be for pages * Revert "Set default search query for initial suggestions to be for pages" This reverts commit b7cb1fe7c1a4e9670c3d3bd22ed321d3cd145481. * Limit change to RichText only * Colocate related props --- packages/format-library/src/link/inline.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/format-library/src/link/inline.js b/packages/format-library/src/link/inline.js index 79933be6a6ac55..e477765009d1c8 100644 --- a/packages/format-library/src/link/inline.js +++ b/packages/format-library/src/link/inline.js @@ -270,6 +270,15 @@ function InlineLinkUI( { createSuggestionButtonText={ createButtonText } hasTextControl settings={ LINK_SETTINGS } + showInitialSuggestions={ true } + suggestionsQuery={ { + // always show Pages as initial suggestions + initialSuggestionsSearchOptions: { + type: 'post', + subtype: 'page', + perPage: 20, + }, + } } /> );