Closed gitpubber closed 2 years ago
At first glance it looks like your list simply doesn't have the right dimensions because it never receives an initial tea.WindowSizeMsg
. I assume resizing your terminal would make the list snap back to an appropriate size?
If you want to dynamically initialize the list you would have to remember the last tea.WindowSizeMsg
in your model and call m.myList.SetSize
after creating the list.
@muesli , Yeah. That was the problem. I saved WindowSizeMsg as state in model. while switching to listview,I set it. Now,it's properly working.
But,it would be nicer if listview automatically does this though.
Hello, thanks for bubbletea. It's really good. I am developing TUI using bubbletea. It's search program which takes input from user and displays list. I was experimenting with prototype. I wanted to have perspective of "Pages" in bubbletea(for ex. Main Page, Search Page , List Page)
Here is the code:
main.go
Problem is that list only shows one element(unless terminal is resized) whereas i wanted it to be fullscreen.
This is what I wanted:
This is what I get:
Only one element is displayed.
Please help me.