mirror of
https://github.com/charmbracelet/gum
synced 2024-06-16 12:35:06 +02:00
fix: show header only if not empty
This commit is contained in:
parent
38521ff870
commit
bb103c0a03
|
@ -134,8 +134,11 @@ func (m model) View() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
view := m.textinput.View() + "\n" + m.viewport.View()
|
view := m.textinput.View() + "\n" + m.viewport.View()
|
||||||
|
if m.header != "" {
|
||||||
return lipgloss.JoinVertical(lipgloss.Left, header, view)
|
return lipgloss.JoinVertical(lipgloss.Left, header, view)
|
||||||
}
|
}
|
||||||
|
return view
|
||||||
|
}
|
||||||
|
|
||||||
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||||
var cmd tea.Cmd
|
var cmd tea.Cmd
|
||||||
|
|
Loading…
Reference in a new issue