()
| 551 | } |
| 552 | |
| 553 | func (m multiSelectModel) getMaxIndex() int { |
| 554 | options := m.filteredOptions() |
| 555 | if m.enableCustomInput { |
| 556 | // Include the "+ Add custom value" entry |
| 557 | return len(options) |
| 558 | } |
| 559 | // Includes only the actual options |
| 560 | return len(options) - 1 |
| 561 | } |
| 562 | |
| 563 | // handleCustomInputMode manages keyboard interactions when in custom input mode |
| 564 | func (m *multiSelectModel) handleCustomInputMode(msg tea.Msg) (tea.Model, tea.Cmd) { |