Skip to content

Commit 90d8c93

Browse files
committed
fix subtle logic ordering issue
1 parent e063043 commit 90d8c93

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

table/render_init.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,12 @@ func (t *Table) initForRenderPaddedColumns() {
289289
}
290290

291291
func (t *Table) initForRenderRows() {
292-
// auto-index: calc the index column's max length
293-
t.autoIndexVIndexMaxLength = len(fmt.Sprint(len(t.rowsRawFiltered)))
294-
295292
// filter the rows as requested (before stringification and sorting)
296293
t.initForRenderFilterRows()
297294

295+
// auto-index: calc the index column's max length
296+
t.autoIndexVIndexMaxLength = len(fmt.Sprint(len(t.rowsRawFiltered)))
297+
298298
// stringify the filtered rows
299299
t.numColumns = 0
300300
t.rows = t.initForRenderRowsStringify(t.rowsRawFiltered, renderHint{})

0 commit comments

Comments
 (0)