Skip to content
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

Add getInitialQuery to documentsearch interface #6256

merged 1 commit into from Apr 27, 2019


Copy link

@aschlaep aschlaep commented Apr 26, 2019

As suggested on #6081 by @gabegrand, this adds getInitialQuery to the ISearchProvider interface. This allows the SearchInstance to get the initial query (set as any because it could be any type of object in the future when we support other search widgets), populate the search box and start a search. To the user, this means that if you have a word selected and press ctrl + f, a search box will open populated with that word, all of the matches will be highlighted, and the selected match will be in yellow. This logic only activates when the search box is initially created, so it won't ever clobber existing text in the search box. Lastly, because search doesn't support newlines, if a selection contains newlines at the time of search box creation, the box will not be populated. @jasongrout

Copy link

@jupyterlab-dev-mode jupyterlab-dev-mode bot commented Apr 26, 2019

Thanks for making a pull request to JupyterLab!

To try out this branch on binder, follow this link: Binder

@jasongrout jasongrout added this to the 1.0 milestone Apr 27, 2019
Copy link

@blink1073 blink1073 left a comment


@blink1073 blink1073 merged commit 392dba9 into jupyterlab:master Apr 27, 2019
9 checks passed
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants