selectInitialIdx picks the starting row: the current row (e.g. active profile), else the first.
(ms []argOption)
| 91 | // selectInitialIdx picks the starting row: the current row (e.g. active |
| 92 | // profile), else the first. |
| 93 | func selectInitialIdx(ms []argOption) int { |
| 94 | for i, o := range ms { |
| 95 | if o.current { |
| 96 | return i |
| 97 | } |
| 98 | } |
| 99 | return 0 |
| 100 | } |
| 101 | |
| 102 | func (m *Model) closePopover() { |
| 103 | m.suggestOpen = false |