Started working on proper controllers

This commit is contained in:
Leon Mika 2022-05-19 09:55:15 +10:00
parent 306640abdb
commit 6df67ce93b
9 changed files with 225 additions and 91 deletions

View file

@ -14,7 +14,7 @@ type itemTableRow struct {
func (mtr itemTableRow) Render(w io.Writer, model table.Model, index int) {
firstLine := strings.SplitN(mtr.item.Value, "\n", 2)[0]
line := fmt.Sprintf("%s\t%s\t%s", mtr.item.Name, "String", firstLine)
line := fmt.Sprintf("%s\t%s\t%s", mtr.item.Name, mtr.item.Type, firstLine)
if index == model.Cursor() {
fmt.Fprintln(w, model.Styles.SelectedRow.Render(line))