charmbracelet / charmbracelet/bubbles

Make filepicker readDirMsg public

Open
#408 0 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
8.9k
Forks
457
Avg merge
1d 18h
Merged PRs (30d)
5

Description

**Is your feature request related to a problem? Please describe.**
I'm using the filepicker bubble inside a bubbleboxer model but even though the init command of the filepicker is well propagated, the readDirMsg doesn't get to the filepicker. I'm probably doing something wrong on my side but I think it would just be easier to be able to filter on that particular message in a switch case block.

**Describe the solution you'd like**
I think it could be great to make the readDirMsg public. Many bubbles have their main message exposed, but not the filepicker

**Describe alternatives you've considered**
Didn't find any yet

**Additional context**
My code looks like this :

```go
func (f FilePickerHolderModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
var cmd tea.Cmd
log.Info(msg) // my array of file
log.Infof("msg type : %T", msg) // readDirMsg
f.fp, cmd = f.fp.Update(msg)
return f,cmd
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.