[PR #135] [MERGED] 10 scroll to selected item #626

Closed
opened 2026-02-28 14:50:15 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Rigellute/spotify-tui/pull/135
Author: @sputnick1124
Created: 11/4/2019
Status: Merged
Merged: 11/4/2019
Merged by: @Rigellute

Base: masterHead: 10-scroll-to-selected-item


📝 Commits (2)

  • 98babcb fix: scroll to make selected item visible in list
  • a683fc1 Merge branch 'master' into 10-scroll-to-selected-item

📊 Changes

1 file changed (+16 additions, -5 deletions)

View changed files

📝 src/ui/mod.rs (+16 -5)

📄 Description

First crack at addressing https://github.com/Rigellute/spotify-tui/issues/10.

Since tui-rs' Table widget does not automatically scroll to the seleted item automatically, I took some inspiration from the SelectableList widget which does.


🔄 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/Rigellute/spotify-tui/pull/135 **Author:** [@sputnick1124](https://github.com/sputnick1124) **Created:** 11/4/2019 **Status:** ✅ Merged **Merged:** 11/4/2019 **Merged by:** [@Rigellute](https://github.com/Rigellute) **Base:** `master` ← **Head:** `10-scroll-to-selected-item` --- ### 📝 Commits (2) - [`98babcb`](https://github.com/Rigellute/spotify-tui/commit/98babcbfb0f75373e5416d7a2de3819b43f2ba49) fix: scroll to make selected item visible in list - [`a683fc1`](https://github.com/Rigellute/spotify-tui/commit/a683fc1f4b5067ac32782353e3cd0037865cd240) Merge branch 'master' into 10-scroll-to-selected-item ### 📊 Changes **1 file changed** (+16 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/ui/mod.rs` (+16 -5) </details> ### 📄 Description First crack at addressing https://github.com/Rigellute/spotify-tui/issues/10. Since tui-rs' `Table` widget does not automatically scroll to the seleted item automatically, I took some inspiration from the [`SelectableList` widget](https://github.com/fdehau/tui-rs/blob/master/src/widgets/list.rs#L213-L239) which does. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:50:15 +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/spotify-tui#626
No description provided.