Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
Abrar-Ahmed7 committed Feb 8, 2023
2 parents dd54245 + efdb8fe commit cede8ea
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions internal/view/table.go
Expand Up @@ -100,14 +100,12 @@ func (t *Table) toggleWideCmd(evt *tcell.EventKey) *tcell.EventKey {
return nil
}
func (t *Table) importAsCSV(evt *tcell.EventKey) *tcell.EventKey {

var tableData [][]string
row := t.GetRowCount()
col := t.GetColumnCount()

for i := 0; i < row; i++ {
rowCount := t.GetRowCount()
colCount := t.GetColumnCount()
for i := 0; i < rowCount; i++ {
var row []string
for j := 0; j < col; j++ {
for j := 0; j < colCount; j++ {
row = append(row, t.GetCell(i, j).Text)
}
tableData = append(tableData, row)
Expand Down

0 comments on commit cede8ea

Please sign in to comment.