-
Notifications
You must be signed in to change notification settings - Fork 144
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
Reacton use_event on vuetify DataTable breaks in Sidebar #522
Comments
Hi Andrew, thank you for opening the issue. The @solara.component
def SidebarTable(on_click):
table = solara.v.DataTable(
items=r_meta.value.to_dict(orient="records"),
headers=[{"text": c, "value": c} for c in r_meta.value.columns],
dense=True,
hide_default_footer=True,
)
solara.v.use_event(table, "click:row", on_click)
return table
@solara.component
def page():
with solara.Sidebar():
SidebarTable(on_click=vue_table_click)
solara.Text(text=row_clicked.value) Let me know if that solves your problem. Regards Maarten |
Thanks for your reply. Your suggestion works fine for me and creating a component does make it more readable aswell 😃 Best, |
I've opened widgetti/reacton#30 so we don't lose track, but the original issue is solved I think. If not, feel free to re-open |
Hello, we are trying to update a Text when the userr clicks on a row of a vuetify DataTable. This works as long it is not in the Sidebar.
Her a working example:
And here an example which is not working:
This leads to the error:
Am I missing something? Romeving the
use_event
leads to running code.I am using solara==1.27.0
Best,
Andrew
The text was updated successfully, but these errors were encountered: