mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #21] Provide selection info for cell, row or column selection via table.SetSelectedFunc parameters #14
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
@rivo commented on GitHub (Jan 13, 2018):
I've added
GetSelectable()to theTableclass. This should give you what you're looking for.