Skip to content

Commit

Permalink
feat: allow setting whether file picker is picking files
Browse files Browse the repository at this point in the history
  • Loading branch information
maaslalani committed Mar 5, 2024
1 parent 62bda51 commit defa666
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions field_filepicker.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ func (f *FilePicker) CurrentDirectory(directory string) *FilePicker {
return f
}

// Picking sets whether the file picker should be in the picking files state.
func (f *FilePicker) Picking(v bool) *FilePicker {
f.setPicking(v)
return f
}

// ShowHidden sets whether to show hidden files.
func (f *FilePicker) ShowHidden(v bool) *FilePicker {
f.picker.ShowHidden = v
Expand Down Expand Up @@ -322,6 +328,7 @@ func (f *FilePicker) WithKeyMap(k *KeyMap) Field {
Open: k.FilePicker.Open,
Select: k.FilePicker.Select,
}
f.setPicking(f.picking)
return f
}

Expand Down

0 comments on commit defa666

Please sign in to comment.