[PR #287] [CLOSED] Added GetFormItems() #896

Closed
opened 2026-03-04 01:08:27 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/287
Author: @mikeschinkel
Created: 6/3/2019
Status: Closed

Base: masterHead: master


📝 Commits (1)

📊 Changes

1 file changed (+6 additions, -0 deletions)

View changed files

📝 form.go (+6 -0)

📄 Description

As I could not find a current way to determine the number of form items from code written outside of the tview.Form class, the GetFormItem(n) method can't be used reliably if the number of fields is unknown. For my use case I wanted to iterate all of them so I am submitting this pull request that would allow a developer to do so.

Hopefully this is simple and obvious enough of a change that it will be a no-brainer to commit.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rivo/tview/pull/287 **Author:** [@mikeschinkel](https://github.com/mikeschinkel) **Created:** 6/3/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`9a39456`](https://github.com/rivo/tview/commit/9a394560285ea663a2a4d73598937fceb6f04c33) Added GetFormItems() ### 📊 Changes **1 file changed** (+6 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `form.go` (+6 -0) </details> ### 📄 Description As I could not find a current way to determine the number of form items from code written outside of the `tview.Form` class, the `GetFormItem(n)` method can't be used reliably if the number of fields is unknown. For my use case I wanted to iterate all of them so I am submitting this pull request that would allow a developer to do so. Hopefully this is simple and obvious enough of a change that it will be a no-brainer to commit. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-04 01:08:27 +03:00
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#896
No description provided.