-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nav Block: Editing a link should show search results #19647
Comments
May require changes to |
This will be tricky because triggering of fetching search results is controlled by the inner mechanics of the underlying
I was thinking we might be able to just try always triggering
We'd need to be careful though cos then we'd need to avoid calling Would need careful unit and manual testing to avoid infinite loops. |
Also worth noting that this implementation may all change due to this discussion #18061. However, that looks someway down the road. |
If the seach is triggered Somewhere between these lines, like this: <input
...
onChange={ this.onChange }
onFocus={ this.onChange }
/> |
@WunderBart That does seem to work fine in my testing. It maybe feels a little hacky to call the |
I think there's going to be more to do than simply triggering a search, as it searches for the URL and not the linked label/page if it's internal. This means, if you hit enter, it disconnects it from the internal page and considers it a plain link. It seems this issue will take more than just triggering the suggestions based on the URL. |
This is also causing a problem for me in #19775, as when an error is shown when Page Creation fails we need to reshow the search results and the Create button. |
@jeryj @WunderBart I have found a way around this on my PR. It's a bit of a hack though so we might need to see what the Core team think. Effectively what I'm doing is forcing the input to detect a new change. I'm doing this by resetting it to an empty string and then immediately setting it back again to the original value. This works! |
Describe the bug
When I edit a navigation link I only see the search term in the box, I don't see any search results so I can select something different. Only when I edit the search term do I see search results.
See this gif for an example:
To reproduce
Steps to reproduce the behavior:
Expected behavior
I should see search results as soon as I hit the "Edit" button. I might have selected the wrong page or post and want to choose a different result.
The text was updated successfully, but these errors were encountered: