We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be nice to have an example showing how to use dialogs and / or all the different types of dialogs available.
Some examples already use dialogs, for example:
extension-examples/context-menu/src/index.ts
Lines 25 to 29 in 36a6595
But it could be useful to have a dedicated example so it's easier to find and reference elsewhere.
The text was updated successfully, but these errors were encountered:
Another question that is sometimes asked is how to dismiss a dialog automatically.
For JupyterLab 3 the following snippet seems to be doing the trick (for dismissing the first dialog only):
const hideFirstDialog = async (_: unknown, w: Dialog<unknown>) => { Dialog.tracker.widgetAdded.disconnect(hideFirstDialog); requestAnimationFrame(() => w.dispose()); }; Dialog.tracker.widgetAdded.connect(hideFirstDialog);
In JupyterLab 4 there is now a ready promise, which could likely be used instead of the requestAnimationFrame above:
ready
requestAnimationFrame
https://github.com/jupyterlab/jupyterlab/blob/0f178d3094f07f4474dc171a9493effbf0b38e90/packages/apputils/src/dialog.tsx#L147-L152
Sorry, something went wrong.
Alternatively, we could improve the documentation which already has a few examples: https://jupyterlab.readthedocs.io/en/latest/extension/ui_helpers.html
No branches or pull requests
It would be nice to have an example showing how to use dialogs and / or all the different types of dialogs available.
Some examples already use dialogs, for example:
extension-examples/context-menu/src/index.ts
Lines 25 to 29 in 36a6595
But it could be useful to have a dedicated example so it's easier to find and reference elsewhere.
The text was updated successfully, but these errors were encountered: