Skip to content

Commit

Permalink
Restore missing fetchSearchSuggestions prop following rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Jan 15, 2020
1 parent abe616c commit 259938a
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions packages/block-editor/src/components/link-control/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export function LinkControl( {
settings,
onChange = noop,
initialSuggestions,
fetchSearchSuggestions,
} ) {
const instanceId = useInstanceId( LinkControl );
const [ inputValue, setInputValue ] = useState( '' );
Expand Down Expand Up @@ -190,20 +191,20 @@ export function LinkControl( {
</Fragment>
) }

{ isEditingLink && (
<LinkControlSearchInput
value={ inputValue }
onChange={ onInputChange }
onSelect={ ( suggestion ) => {
setIsEditingLink( false );
onChange( { ...value, ...suggestion } );
} }
renderSuggestions={ renderSearchResults }
fetchSuggestions={ getSearchHandler }
onReset={ resetInput }
initialSuggestions={ initialSuggestions }
/>
) }
{ isEditingLink && (
<LinkControlSearchInput
value={ inputValue }
onChange={ onInputChange }
onSelect={ ( suggestion ) => {
setIsEditingLink( false );
onChange( { ...value, ...suggestion } );
} }
renderSuggestions={ renderSearchResults }
fetchSuggestions={ getSearchHandler }
onReset={ resetInput }
initialSuggestions={ initialSuggestions }
/>
) }

{ ! isEditingLink && (
<LinkControlSettingsDrawer value={ value } settings={ settings } onChange={ onChange } />
Expand Down

0 comments on commit 259938a

Please sign in to comment.