“Bubble Tea list shows ‘ghost’ items after SetItems on custom filter” #1489
                  
                    
                      shripadrayewar
                    
                  
                
                  started this conversation in
                General
              
            Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I’m building a two-pane TUI using
bubbles/list(left list + right detail). I added a custom filter input (textinput) to narrow items in the list. The filtering works, but when I type a query, I still see “ghost” entries from the previous unfiltered state (they scroll into view or appear below the filtered ones).Here’s the relevant code from my filter function:
What I expect: only the filtered items show.
What happens: filtered items show at the top, but I can still scroll into the old entries (ghost items).
Am I missing something obvious with
list.SetItemsor how the list’s internal state resets? What’s the correct way to completely replace items without ghost entries?Beta Was this translation helpful? Give feedback.
All reactions