-
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:
Problem is that list only shows one element(unless terminal is resized) whereas i wanted it to be fullscreen. Only one element is displayed. Please help me. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
At first glance it looks like your list simply doesn't have the right dimensions because it never receives an initial If you want to dynamically initialize the list you would have to remember the last |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
Hopping on this discussion as I'm noticing something odd in regard of the list sizing. I'm not sure (yet) if I'm correct with this obsevation but if one uses a |
Beta Was this translation helpful? Give feedback.
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 callm.myList.SetSize
after creating the list.