Add Not Selectable Rows to interactiveView

This commit is contained in:
aditya-K2
2023-04-14 01:04:47 +05:30
parent 05e58a2693
commit b99f9180a7

View File

@@ -240,8 +240,12 @@ func (i *interactiveView) update() {
i.Table.SetCell(x, 0,
GetCell(b, tcell.StyleDefault.Foreground(fg).Background(fg)))
for y := range s[x] {
selectable := true
if s[x][y].Style == NotSelectableStyle {
selectable = false
}
i.Table.SetCell(x, y+1,
GetCell(s[x][y].Content, s[x][y].Style).SetMaxWidth(w/n).SetExpansion(1))
GetCell(s[x][y].Content, s[x][y].Style).SetMaxWidth(w/n).SetExpansion(1).SetSelectable(selectable))
}
}
}