A couple of new features and fixes
Hi,
first of all, sorry for this relatively large PR.
The features and fixes contained in this PR are originally from a fork of tview
, which I created a couple of weeks ago. As you may have noticed, the maintainer of tview
is not very active (no offense) and only edits issues in large intervals. PRs are also lying around for a long time.
Now I recently stumbled across your fork and thought I'd add my extensions to it.
Besides the other new features and fixes this PR contains two Breaking Changes:
AndreasBieber/cview@1ad2f3a0 (Expose ListItem
):
The signature of SetChangedFunc
and SetSelectedFunc
has changed to pass the newly exposed ListItem
instead of its properties
AndreasBieber/cview@844c13a2 (Expose DropDownOption
):
DropDown
- The signature of
GetCurrentOption
has been changed to return the index and the newly exposedDropDownOption
-
AddOption
has been renamed toAddOptions
and accepts now multipleDropDownOption
s. A convenience func calledAddOptionsSimple
has been added to simply add options by only providing its text. - The signature of
SetOptions
has been changed to accept the globalselected
handler with the newly exposedDropDownOption
and multipleDropDownOption
s to set. A convenience func, namelySetOptionsSimple
, has been added to simply add options by only providing its text. - The signature of
SetSelectedFunc
has been changed to accept a handler expecting an index and the newly exposedDropDownOption
Form
- The signature of
AddDropDown
has been changed to accept an array of the newly exposedDropDownOption
. A convenience func, namelyAddDropDownSimple
, has been added to simply add a DropDown by only providing the option's text.
Each commit with a breaking change contains a description of what has changed that lead to the breaking change.
I tried to keep each commit as small as possible. And as you will notice I've used symantic commit style. If you don't want this I can adjust it to your current commit style.
I know this is a lot to review, but I think its worth it.
Cheers Andreas
PS: Sorry again