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

Improve access to event arguments #672

Closed
falkoschindler opened this issue Mar 30, 2023 Discussed in #664 · 1 comment · Fixed by #1095
Closed

Improve access to event arguments #672

falkoschindler opened this issue Mar 30, 2023 Discussed in #664 · 1 comment · Fixed by #1095
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@falkoschindler
Copy link
Contributor

Discussed in #664

Originally posted by bobanovo March 29, 2023
Hi,
I would like to ask for help. For ui.table I need to listen, on which row was clicked, and process the id of row in the rest of the code.
When I used ui.table (qtable), and table.on('rowClick', callback_function), the function has only one parameter, which doesn't contain the id of the row, or data of specific row etc. What do I wrong?

tbl1=ui.table(columns=columns_, rows=rows_, row_key='id', selection='single').props('')
print(tbl1.on('rowClick', lambda msg: print("> ",msg)))

and the output:

>  {'id': 4, 'type': 'rowClick', 'args': {'isTrusted': True, '_vts': 1680074011030}}
>  {'id': 4, 'type': 'rowClick', 'args': {'isTrusted': True, '_vts': 1680074011218}}
>  {'id': 4, 'type': 'rowClick', 'args': {'isTrusted': True, '_vts': 1680074011840}}
>  {'id': 4, 'type': 'rowClick', 'args': {'isTrusted': True, '_vts': 1680074012014}}

Thanks a lot, for your help.
Radek

We need to find a way to include more than the first event argument (see let handler = (e) => { in index.html). This also affects the argument-filtering mechanism (the args parameter).

@falkoschindler falkoschindler self-assigned this Mar 30, 2023
@falkoschindler falkoschindler added the enhancement New feature or request label Mar 30, 2023
@falkoschindler falkoschindler changed the title new ui.table and event rowClick Improve access to event arguments Mar 30, 2023
@falkoschindler falkoschindler added this to the v1.3.0 milestone Apr 6, 2023
@falkoschindler falkoschindler added the help wanted Extra attention is needed label Apr 13, 2023
@falkoschindler falkoschindler linked a pull request Jun 27, 2023 that will close this issue
4 tasks
@rodja
Copy link
Member

rodja commented Jun 29, 2023

Code is merged 🎉

@rodja rodja closed this as completed Jun 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 help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants