Open justin-9rd opened 1 month ago
After some debugging and having to pull the filepicker into my own project I found that I can resolve this issue in my code base by up dated the WindowSize msg check
case tea.WindowSizeMsg:
if m.AutoHeight {
m.Height = msg.Height - marginBottom
}
m.max = m.Height - 1
if len(m.files) == 0 {
return m, m.readDir(m.CurrentDirectory, m.ShowHidden)
}
This does not feel like the right solution.
Overall seems that the readDirMsg isn't getting picked up in time as my WindowSizeMsg is begin the first thing I pick up in my logs even though I can see the Init function firing in my logs. Not sure what would be the best fix without understanding how the underlining system is processing the messages
Describe the bug Working on a tui http client Muninn and I'm using the filepicker bubble to find the
.http
files on my system. Well when the application initialize I get a "no files found" this isn't the same behaivor I get when working on the example you guys have built. I've rewritten the example using all the same steps I use in my code and it produces list of directory as expected but if I copy that code into my code base it still shows "no files found".Setup Please complete the following information along with version numbers, if applicable.
To Reproduce Steps to reproduce the behavior:
go run main.go
h
to go back a directory and see that the filepicker is working fine from thereSource Code Please include source code if needed to reproduce the behavior. muninn filepicker:
/internal/tui/filepicker_view.go
Minimal standalone file
Expected behavior When my application starts I expect the files and directories to appear just like the minimal example
Screenshots What my application renders
What I expect it to render in the first box