[PR #836] adding an option to disable dropdown primitive automatic selection of an item #1059

Open
opened 2026-03-04 01:09:14 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rivo/tview/pull/836
Author: @navidys
Created: 4/7/2023
Status: 🔄 Open

Base: masterHead: dropdown_autoselect


📝 Commits (1)

  • c51e927 add option to disable dropdown primitive automatic selection of an item (based on prefix)

📊 Changes

1 file changed (+18 additions, -7 deletions)

View changed files

📝 dropdown.go (+18 -7)

📄 Description

Adding an option to disable dropdown primitive automatice selection of an item based on prefix.
Some applications using vim like key binding such as:

  • j: Move down
  • k: Move up
  • l: Move right
  • h: Move left

Dropdown primitive by default will select an input based on input key rune (prefix) that will cause issue with such a key bindings. Its possible to change to parse and change the key even in the application side, however I thought it will be more cleaner to be have an option.


🔄 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/836 **Author:** [@navidys](https://github.com/navidys) **Created:** 4/7/2023 **Status:** 🔄 Open **Base:** `master` ← **Head:** `dropdown_autoselect` --- ### 📝 Commits (1) - [`c51e927`](https://github.com/rivo/tview/commit/c51e9273fdd62104c3f1baa976ea0c8b3448f55d) add option to disable dropdown primitive automatic selection of an item (based on prefix) ### 📊 Changes **1 file changed** (+18 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `dropdown.go` (+18 -7) </details> ### 📄 Description Adding an option to disable dropdown primitive automatice selection of an item based on prefix. Some applications using vim like key binding such as: - j: Move down - k: Move up - l: Move right - h: Move left Dropdown primitive by default will select an input based on input key rune (prefix) that will cause issue with such a key bindings. Its possible to change to parse and change the key even in the application side, however I thought it will be more cleaner to be have an option. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#1059
No description provided.