mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #832] SetAcceptanceFunc handler could use an index param #606
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#606
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 @atzub on GitHub (Apr 3, 2023).
Original GitHub issue: https://github.com/rivo/tview/issues/832
Currently the handler gets the text coming from the InputField and the rune which was just entered. If the rune appears more than once in the text, there's no telling which one it is. Based on its location, the acceptance logic could change, as just happened for me when I used it to validate an IP with netmask length. I needed to know if the number is to the right of the '/' or not.
Also wanted to say, I'm a big fan of your work rivo, tview is incredible and I enjoy using it very much.
@rivo commented on GitHub (Apr 3, 2023):
That's true. I don't know how to change it without breaking compatibility, though.