(msg tea.KeyPressMsg)
| 145 | } |
| 146 | |
| 147 | func (m Logs) handleFilterKey(msg tea.KeyPressMsg) (Component, tea.Cmd) { |
| 148 | if key.Matches(msg, logsKeys.Back) { |
| 149 | m.filterActive = false |
| 150 | m.filterEnabled = true |
| 151 | m.filterText = "" |
| 152 | m.filterInput.SetValue("") |
| 153 | m.filterInput.Blur() |
| 154 | m.help.SetBindings(logsHelpBindings(m.filterEnabled)) |
| 155 | m.rebuildContent() |
| 156 | return m, nil |
| 157 | } |
| 158 | |
| 159 | var cmd tea.Cmd |
| 160 | m.filterInput, cmd = m.filterInput.Update(msg) |
| 161 | m.filterText = m.filterInput.Value() |
| 162 | m.rebuildContent() |
| 163 | return m, cmd |
| 164 | } |
| 165 | |
| 166 | func (m Logs) handleNormalKey(msg tea.KeyPressMsg) (Component, tea.Cmd) { |
| 167 | switch { |
no test coverage detected