From 946d2620b6a35b8d9647964a89b3aa19fa477b13 Mon Sep 17 00:00:00 2001 From: Oliver <480930+rivo@users.noreply.github.com> Date: Sat, 13 Jan 2018 12:51:12 +0100 Subject: [PATCH] Added GetSelectable() to Table so users can find out what is currently selectable. Resolves #21 --- table.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/table.go b/table.go index 20c5e1c..7c08ed8 100644 --- a/table.go +++ b/table.go @@ -197,6 +197,12 @@ func (t *Table) SetSelectable(rows, columns bool) *Table { return t } +// GetSelectable returns what can be selected in a table. Refer to +// SetSelectable() for details. +func (t *Table) GetSelectable() (rows, columns bool) { + return t.rowsSelectable, t.columnsSelectable +} + // Select sets the selected cell. Depending on the selection settings // specified via SetSelectable(), this may be an entire row or column, or even // ignored completely.