Hello, i am testing the data_table.py
however it ONly show 2 Row,
i cannot find have keywords in Doc that control the ROWs,
but scollable or frozen row only
can you give me a hints thanks!
If you aren’t sure about your datatable height I’d recommend leaving the override_height argument.
I am unable to reproduce the table freezing issue at my end but I think if you will override view port height that’s less than the table height it will hide last few rows, which might look like a table freeze. For resolving this pass the same height as of the view port into the DataTable as a argument.
Check this GIF for this explanation in action,
one more things is the example you provided did have “Column” name, i thinks its better to provide a complete function thanks~
so that as i newbie like it would help me a lot if you have a complete guide and function
and also the example provide i hope it does match the demo you show in read me~
thanks~
You can pass the column name in TableColumn object something like this,
columns = [
TableColumn(field=“x”, title=“this is column name x”)
]
The reason why I haven’t given it in docs thoroughly is because it’s not really a feature of streamlit-bokeh-events it’s more on Bokeh’s side, You can lookup Bokeh DataTables documentation for more options.
Also I love the idea of having already available functions for the common tasks in the library itself but the streamlit-bokeh-events is a little lower level, so that you can create your own utility functions by wrapping these event handlers as event handling varies widely user to user.
May I ask if you can please add use_container_width parameter support.
without it I’m having an issue to maintain the table aspect ratio on small screens.
Thank you @ash2shukla
One more thing I observed.
If I set refresh_on_update to true and give it another input, the table is changed but the selected rows are not initialized and the results are still related to the previous data table.
Do you have any idea how can I handle this scenario?
Thanks
Many thanks @ash2shukla for this awesome data table example…
But how could it be possible to display the whole dataframe without the scroll bar (in your example) ?
And how to rename columns … instead of “null” ?
@ash2shukla, sorry for this question, but by any means would it be possible to be able to move manually one dot in the scatter plot and get eventually the dataframe values changed accordingly ??
Never say sorry for asking a question !
Can you elaborate more on it ?
If you mean that selecting one dot in scatter plot and getting the corresponding values then you can definitely get this done by binding the “tap” event in bokeh.
Huh, that’s a really interesting idea! but I think you’ll need to build a proper component for this (I don’t think DrawableCanvas will fit the job either)