Skip to content

Commit

Permalink
refactor: simplify table implementation (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
leg100 authored Aug 10, 2024
1 parent 769746a commit 73696e9
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 144 deletions.
4 changes: 2 additions & 2 deletions internal/tui/table/dimensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ package table
// Update column widths in-place.
//
// TODO: unit test
func (m *Model[V]) recalculateWidth() {
func (m *Model[V]) setColumnWidths() {
var (
// total available flex width initialized to total viewport width minus
// the padding on each col (2)
totalFlexWidth = m.viewport.Width - 2*len(m.cols)
totalFlexWidth = m.tableWidth() - 2*len(m.cols)
totalFlexFactor int
flexGCD int
)
Expand Down
Loading

0 comments on commit 73696e9

Please sign in to comment.