-
Notifications
You must be signed in to change notification settings - Fork 332
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
Click on table: Need to access not only row-name but also column-name #2432
Comments
The solution should work as long as the Wave framework allows injecting and executing custom JavaScript for event handling in the frontend. ` @app('/')
` If the table does not provide data-column-name attributes: Use alternative methods, such as calculating the column index from the cell's position or accessing the header cell (th) for the clicked column. encounter any issues during implementation, and I can help you troubleshoot. Dm me on @rutujmirzapure |
Thank you so much for your hint and the code example. But unfortunately, I'm not able to run your code. Here is the output of
Any idea, what is going wrong here? |
ui.inline_script directly inside a card (e.g., ui.form_card), which is not supported by Wave. The ui.inline_script component is not a valid child for FormCard or most other Wave card components. error : ValueError: FormCard.items element: want one of (<class 'h2o_wave.types.Component'>,), got <class 'h2o_wave.types.InlineScript'> ----> ui.form_card expects child components to be of type Component, and ui.inline_script is not a valid child type. `from h2o_wave import main, app, Q, ui @app('/')
` Things To Note:Ensure that your Wave server is up to date with the latest version (pip install h2o-wave --upgrade). If you want to include custom JavaScript (like window.open for external links) in your Wave app, you should add it at the global level, outside specific card definitions. This ensures the script is applied correctly. |
In the documentation
https://wave.h2o.ai/docs/examples/table-events-select
it is shown that using the ui.table property
events=['select']
will enable an event handler so that when clicking on a table the row-name under the cursor is given as
q.args['<table_name>']
on the called table-handler.
But we need also the column name of the cell which was selected.
So, in our application we have a grid of numbers and need to know the cell which was selected.
How can I get this information, so the column name of the cell?
Thanks
Michael
The text was updated successfully, but these errors were encountered: