fix(dashboard): leggi righe selezionate da e.args nel callback selection
Il callback registrato via top_table.on("selection", ...) riceve un
GenericEventArguments di NiceGUI, non un TableSelectionEventArguments,
quindi l'attributo .selection non esiste e il click su una riga della
tabella "Top genomi" generava AttributeError. Le righe selezionate
arrivano nel payload Quasar come e.args["rows"].
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -847,9 +847,10 @@ def genomes() -> None:
|
|||||||
_render_detail(match.iloc[0].to_dict())
|
_render_detail(match.iloc[0].to_dict())
|
||||||
|
|
||||||
def on_row_selected(e: Any) -> None:
|
def on_row_selected(e: Any) -> None:
|
||||||
if not e.selection:
|
rows = (e.args or {}).get("rows") or []
|
||||||
|
if not rows:
|
||||||
return
|
return
|
||||||
full_id = e.selection[0].get("_full_id")
|
full_id = rows[0].get("_full_id")
|
||||||
if not full_id:
|
if not full_id:
|
||||||
return
|
return
|
||||||
state["selected_gid"] = full_id
|
state["selected_gid"] = full_id
|
||||||
|
|||||||
Reference in New Issue
Block a user