Started working on proper controllers
This commit is contained in:
parent
306640abdb
commit
6df67ce93b
9 changed files with 225 additions and 91 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue