on_cell_press (and the other press handlers) are using the visible index to fetch from the model. The model expects the model index. This means if the user has rearranged any columns, the value will be incorrect.
Steps to reproduce
Run this Python code
from deephaven import empty_table
from deephaven import ui
@ui.component
def my_table():
t = empty_table(50).update([
f"A{i} = i + {i}" for i in range(3)
])
return ui.table(t, on_cell_press=print)
t = my_table()
Click A2 top cell. Should print [2, 0] and value 2.
Description
on_cell_press
(and the other press handlers) are using the visible index to fetch from the model. The model expects the model index. This means if the user has rearranged any columns, the value will be incorrect.Steps to reproduce
Run this Python code
Click A2 top cell. Should print [2, 0] and value 2.
Swap columns A2 and A1.
Click A1 top cell (the new top right cell)
Expected results
Actual results
Versions
Deephaven UI 0.14.0