Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions marimo/_plugins/ui/_impl/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
validate_page_size,
)
from marimo._runtime.context.types import (
_THREAD_LOCAL_CONTEXT,
ContextNotInitializedError,
get_context,
)
Expand Down Expand Up @@ -180,9 +181,8 @@ class PreviewColumnArgs:

def get_default_table_page_size() -> int:
"""Get the default number of rows to display in a table."""
try:
ctx = get_context()
except ContextNotInitializedError:
ctx = _THREAD_LOCAL_CONTEXT.runtime_context
if ctx is None:
return 10
else:
return ctx.marimo_config["display"]["default_table_page_size"]
Expand Down