Spaces:
Running
Running
Mandark-droid
commited on
Commit
·
d87972c
1
Parent(s):
dafc8f1
Fix HTMLPlus event handler to use camelCase keys
Browse files- JavaScript automatically converts data-run-id to runId (camelCase)
- Update event handler to look for 'runId' instead of 'run-id'
- Add error logging to show available keys for debugging
app.py
CHANGED
|
@@ -1163,11 +1163,13 @@ def on_html_leaderboard_select(evt: gr.SelectData):
|
|
| 1163 |
}
|
| 1164 |
|
| 1165 |
# Get the run_id from the data attributes
|
|
|
|
| 1166 |
row_data = evt.value
|
| 1167 |
-
run_id = row_data.get('
|
| 1168 |
|
| 1169 |
if not run_id:
|
| 1170 |
gr.Warning("No run ID found in selection")
|
|
|
|
| 1171 |
return {
|
| 1172 |
leaderboard_screen: gr.update(visible=True),
|
| 1173 |
run_detail_screen: gr.update(visible=False),
|
|
|
|
| 1163 |
}
|
| 1164 |
|
| 1165 |
# Get the run_id from the data attributes
|
| 1166 |
+
# Note: HTML data-run-id becomes runId in JavaScript (camelCase conversion)
|
| 1167 |
row_data = evt.value
|
| 1168 |
+
run_id = row_data.get('runId') # JavaScript converts data-run-id to runId
|
| 1169 |
|
| 1170 |
if not run_id:
|
| 1171 |
gr.Warning("No run ID found in selection")
|
| 1172 |
+
print(f"[ERROR] No run_id found. Available keys: {list(row_data.keys())}")
|
| 1173 |
return {
|
| 1174 |
leaderboard_screen: gr.update(visible=True),
|
| 1175 |
run_detail_screen: gr.update(visible=False),
|