From daac2ce5b54bf71db59e9b2e99889b6ba06b7acb Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Tue, 18 Aug 2020 17:58:07 +1000 Subject: [PATCH] WIP: Navigation Link variations --- .../src/components/link-control/index.js | 2 + .../components/link-control/search-input.js | 2 + .../link-control/use-search-handler.js | 19 +++-- .../src/navigation-link/block.json | 8 +- .../block-library/src/navigation-link/edit.js | 31 +++++++- .../src/navigation-link/index.js | 40 ++++++++++ .../src/navigation-link/index.php | 24 +++++- packages/block-library/src/navigation/edit.js | 7 +- .../block-library/src/navigation/editor.scss | 4 + .../src/navigation/placeholder.js | 79 +++++++++++++------ .../editor/src/components/provider/index.js | 73 +++++++++++------ 11 files changed, 224 insertions(+), 65 deletions(-) diff --git a/packages/block-editor/src/components/link-control/index.js b/packages/block-editor/src/components/link-control/index.js index 9dba8d36721f1..222602dc8b945 100644 --- a/packages/block-editor/src/components/link-control/index.js +++ b/packages/block-editor/src/components/link-control/index.js @@ -109,6 +109,7 @@ function LinkControl( { createSuggestion, withCreateSuggestion, inputValue: propInputValue = '', + suggestionsQuery = {}, } ) { if ( withCreateSuggestion === undefined && createSuggestion ) { withCreateSuggestion = true; @@ -209,6 +210,7 @@ function LinkControl( { showInitialSuggestions={ showInitialSuggestions } allowDirectEntry={ ! noDirectEntry } showSuggestions={ showSuggestions } + suggestionsQuery={ suggestionsQuery } >