[GH-ISSUE #21] Provide selection info for cell, row or column selection via table.SetSelectedFunc parameters #14

Closed
opened 2026-03-04 01:01:07 +03:00 by kerem · 1 comment
Owner

Originally created by @andrewuhl on GitHub (Jan 13, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/21

For table.SetSelectedFunc, it would be useful to provide as an additional argument whether a full row or column has been selected, rather than having undefined behavior for row index (when a column is selected) or for column index (when a row is selected). E.g.

SetSelectedFunc(row, column int, selectionState ?)

where selectionState is an enum of three possible states, e.g.:

0: CellSelected = a cell is selected
1: RowSelected = a row is selected
2: ColumnSelected = a column is selected

Originally created by @andrewuhl on GitHub (Jan 13, 2018). Original GitHub issue: https://github.com/rivo/tview/issues/21 For table.SetSelectedFunc, it would be useful to provide as an additional argument whether a full row or column has been selected, rather than having undefined behavior for row index (when a column is selected) or for column index (when a row is selected). E.g. SetSelectedFunc(row, column int, selectionState ?) where selectionState is an enum of three possible states, e.g.: 0: CellSelected = a cell is selected 1: RowSelected = a row is selected 2: ColumnSelected = a column is selected
kerem closed this issue 2026-03-04 01:01:07 +03:00
Author
Owner

@rivo commented on GitHub (Jan 13, 2018):

I've added GetSelectable() to the Table class. This should give you what you're looking for.

<!-- gh-comment-id:357429272 --> @rivo commented on GitHub (Jan 13, 2018): I've added `GetSelectable()` to the `Table` class. This should give you what you're looking for.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tview#14
No description provided.