[PR #214] [CLOSED] change: adding function (*List).InsertItem() to allow inserting items at arbitrary positions in the list #879

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

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/214
Author: @ardnew
Created: 1/3/2019
Status: Closed

Base: masterHead: list-insertitem


📝 Commits (9)

  • 334dfbe Adding accept() callback support for all relevant input changes in an InputField
  • 739b305 Merge https://github.com/rivo/tview
  • a207e47 change: provide drop-down option text and index as args to selection callback when using (*DropDown).AddOption()
  • 4dafc38 change: provide drop-down option text and index as args to selection callback when using (*DropDown).AddOption()
  • bb67120 change: adding function (*List).InsertItem() to allow inserting items at arbitrary positions in the list
  • 75c14a5 Merge remote-tracking branch 'upstream/master'
  • 80eeae3 Merge branch 'dropdown-addoption' of https://github.com/ardnew/tview
  • fafd074 change: implemented view tracking in List for more natural navigation
  • e29989f Merge branch 'master' into list-insertitem

📊 Changes

3 files changed (+108 additions, -35 deletions)

View changed files

📝 dropdown.go (+17 -13)
📝 inputfield.go (+4 -2)
📝 list.go (+87 -20)

📄 Description

#213

Initial implementation based on existing behavior of List.AddItem. Please consider my comments on the behavior when index < 0. Seemed a bit out of scope for this 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/214 **Author:** [@ardnew](https://github.com/ardnew) **Created:** 1/3/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `list-insertitem` --- ### 📝 Commits (9) - [`334dfbe`](https://github.com/rivo/tview/commit/334dfbe7eefba4e1279cf0e5f537846125872d0d) Adding accept() callback support for all relevant input changes in an InputField - [`739b305`](https://github.com/rivo/tview/commit/739b305ec7c56c1cc23e83b35abf37133fe3328d) Merge https://github.com/rivo/tview - [`a207e47`](https://github.com/rivo/tview/commit/a207e47fb4e271568e81c0d5e225a9d1b39a6673) change: provide drop-down option text and index as args to selection callback when using (*DropDown).AddOption() - [`4dafc38`](https://github.com/rivo/tview/commit/4dafc3875862887b907ddf19234b2074271072ae) change: provide drop-down option text and index as args to selection callback when using (*DropDown).AddOption() - [`bb67120`](https://github.com/rivo/tview/commit/bb67120511d26b93ef4cd80283e1a0f607f3a69e) change: adding function (*List).InsertItem() to allow inserting items at arbitrary positions in the list - [`75c14a5`](https://github.com/rivo/tview/commit/75c14a56440bb2fb9d5c60b99298c5d14b089205) Merge remote-tracking branch 'upstream/master' - [`80eeae3`](https://github.com/rivo/tview/commit/80eeae329d51842ca86cfcc4a6a232a49ee8de00) Merge branch 'dropdown-addoption' of https://github.com/ardnew/tview - [`fafd074`](https://github.com/rivo/tview/commit/fafd0745f0b6154685ed7ab4342e60c18d1b44ea) change: implemented view tracking in List for more natural navigation - [`e29989f`](https://github.com/rivo/tview/commit/e29989fc05c68e754792795d27981f5a7d4cfac4) Merge branch 'master' into list-insertitem ### 📊 Changes **3 files changed** (+108 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `dropdown.go` (+17 -13) 📝 `inputfield.go` (+4 -2) 📝 `list.go` (+87 -20) </details> ### 📄 Description #213 Initial implementation based on existing behavior of `List.AddItem`. Please consider my comments on the behavior when `index < 0`. Seemed a bit out of scope for this 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:22 +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#879
No description provided.