Skip to content

Commit

Permalink
fix: add missing function in render_gt
Browse files Browse the repository at this point in the history
  • Loading branch information
machow committed Aug 23, 2024
1 parent acc2679 commit 299c13d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion reactable/render_gt.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ def create_col_groups(spanners: Spanners) -> list[ColGroup]:
return col_groups


def _is_empty(heading: Heading):
# TODO: this should be moved into great tables
self = heading
return self.title is None and self.subtitle is None and self.preheader is None


def create_heading(heading: Heading, use_search: bool) -> html.Tag | None:
if heading.is_empty():
if _is_empty(heading):
return None

el = html.div(
Expand Down

0 comments on commit 299c13d

Please sign in to comment.