Skip to content

Commit

Permalink
fix: empty tables total rows
Browse files Browse the repository at this point in the history
total rows is 0 for empty tables, not too_many
  • Loading branch information
akshayka committed Sep 6, 2024
1 parent 91fdc6e commit 0b64d1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion marimo/_plugins/ui/_impl/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ def __init__(
if _internal_total_rows is not None:
total_rows = _internal_total_rows
else:
total_rows = self._manager.get_num_rows(force=True) or "too_many"
total_rows = self._manager.get_num_rows(force=True)
total_rows = total_rows if total_rows is not None else "too_many"

if pagination is False and total_rows != "too_many":
page_size = total_rows
Expand Down

0 comments on commit 0b64d1b

Please sign in to comment.