-
Notifications
You must be signed in to change notification settings - Fork 788
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
DataTable improvements (and more) #1547
Conversation
"datatable--cursor-fixed", | ||
"datatable--highlight-fixed", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll probably need to change the names of these when we do "labelled" rows/columns - the fixed/header concepts are a little conflated at the moment.
cursor_cell: Reactive[Coord] = Reactive(Coord(0, 0), repaint=False) | ||
hover_cell: Reactive[Coord] = Reactive(Coord(0, 0), repaint=False) | ||
cursor_cell: Reactive[Coordinate] = Reactive( | ||
Coordinate(0, 0), repaint=False, always_update=True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always_update
is required as sometimes we need to force validation via self.cursor_cell = self.cursor_cell
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We should think about an example that uses the data-table. One for another PR.
Added
table.show_cursor = False
. This will hide the cursor. The cursor state is retained when re-enabled. When you disable it, scrolling with arrow keys works as normal. When you re-enable it, the cursor will be scrolled to.Coord
class into own module for reuse, and rename it toCoordinate
.datatable-cursors-16jan23.mov
Issues encountered
show_cursor
was part of the API but not actually implemented.show_header
set toFalse
.Please review the following checklist.