Skip to content

Commit

Permalink
fix: cell background color on set value
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgerojas26 committed Oct 11, 2024
1 parent f13c824 commit 2088995
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions components/ResultsTable.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,9 @@ func (table *ResultsTable) tableInputCapture(event *tcell.EventKey) *tcell.Event
table.SetInputCapture(nil)

cell := table.GetCell(selectedRowIndex, selectedColumnIndex)
x, y, width := cell.GetLastPosition()
x, y, _ := cell.GetLastPosition()

list := NewSetValueList()
list.SetRect(x, y, width, 7)

list.OnFinish(func(selection models.CellValueType, value string) {
table.FinishSettingValue()
Expand Down Expand Up @@ -438,7 +437,7 @@ func (table *ResultsTable) UpdateRowsColor(headerColor tcell.Color, rowColor tce
} else {
cellReference := cell.GetReference()

if cellReference != nil && cellReference == "EMPTY&" || cellReference == "NULL&" || cellReference == "DEFAULT&" {
if cellReference != nil && (cellReference == "EMPTY&" || cellReference == "NULL&" || cellReference == "DEFAULT&") && (cell.BackgroundColor != DeleteColor && cell.BackgroundColor != ChangeColor && cell.BackgroundColor != InsertColor) {
cell.SetStyle(table.GetItalicStyle())
} else {
cell.SetTextColor(rowColor)
Expand Down

0 comments on commit 2088995

Please sign in to comment.