MCPcopy
hub / github.com/mathaou/termdbms / GetSelectedOption

Method GetSelectedOption

viewer/tableutil.go:204–215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

202}
203
204func (m *TuiModel) GetSelectedOption() (*interface{}, int, []interface{}) {
205 if !m.UI.FormatModeEnabled {
206 m.Scroll.PreScrollYOffset = m.Viewport.YOffset
207 m.Scroll.PreScrollYPosition = m.MouseData.Y
208 }
209 row := m.GetRow()
210 col := m.GetColumnData()
211 if row >= len(col) {
212 return nil, row, col
213 }
214 return &col[row], row, col
215}
216
217func (m *TuiModel) DisplayMessage(msg string) {
218 m.Data().EditTextBuffer = msg

Callers 3

initFunction · 0.80
EditEnterFunction · 0.80
SelectOptionFunction · 0.80

Calls 2

GetRowMethod · 0.95
GetColumnDataMethod · 0.95

Tested by

no test coverage detected