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 support for continuous_update=False #433

Open
alphaparrot opened this issue Aug 29, 2023 · 0 comments
Open

Add support for continuous_update=False #433

alphaparrot opened this issue Aug 29, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@alphaparrot
Copy link

In the normal course of operations I would like to be able to make a selection in the datagrid, and then have some action be taken as a result through an event handler (such as go query/load/compute data based on the selection, and then reflect that in some form of output). However, sometimes, I as the user might overshoot my intended selection, and drag my mouse back to my intended selection area. Or, I may simply click and drag from one cell to another.

When the DataGrid is registered to an ipywidgets event handler using DataGrid.observe(myFunct,names='selections'), this will trigger multiple times as the mouse is dragged throughout the grid, as the selection is changing each time. That therefore triggers the event handler multiple times, which depending on the action that needs to be taken, could be costly.

What would be ideal would be the addition of support for the continuous_update keyword that many other ipywidgets accept, whereby if the keyword is False (default is True), an event will only be triggered when the user has indicated that input is completed, such as by hitting Enter, moving the focus away from the widget, or lifting the mouse button (which would be the ideal criterion for this scenario).

In the meantime the workaround is to not register any event handlers to the datagrid itself, and instead create a button that the user must click to have their selection recognized. This however is clunky, and adds an additional step to the user's UI experience.

@martinRenou martinRenou added the enhancement New feature or request label Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants