Skip to content

Commit

Permalink
Merge branch 'main' into negative-numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
kateriley1 authored Jan 27, 2025
2 parents 7d50be0 + d063283 commit 0f8d986
Showing 1 changed file with 37 additions and 21 deletions.
58 changes: 37 additions & 21 deletions gov_uk_dashboards/components/plotly/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
from dash import html, dcc
from gov_uk_dashboards.components.plotly.card import card
from gov_uk_dashboards.components.plotly.paragraph import paragraph
from gov_uk_dashboards.components.plotly.row_component import row_component

# from gov_uk_dashboards.components.plotly.row_component import row_component


def table_from_dataframe(
Expand Down Expand Up @@ -260,24 +261,39 @@ def table_from_polars_dataframe(
)
)

return row_component(
card(
row_component(
card(
[
html.Table(
table_contents,
className="govuk-table table-header-cell-top-padding",
id=table_id,
role="table",
**table_properties,
),
paragraph(table_footer) if table_footer else None,
],
amend_style={"padding": "0px"},
),
horizontal_scroll=True,
)
),
horizontal_scroll=True,
# commented below out as prevents sticky header, although now not optimised for mobile devices
return card(
[
html.Table(
table_contents,
className="govuk-table table-header-cell-top-padding",
id=table_id,
role="table",
**table_properties,
),
paragraph(table_footer) if table_footer else None,
],
amend_style={"padding": "0px"},
)

# return row_component(
# card(
# row_component(
# card(
# [
# html.Table(
# table_contents,
# className="govuk-table table-header-cell-top-padding",
# id=table_id,
# role="table",
# **table_properties,
# ),
# paragraph(table_footer) if table_footer else None,
# ],
# amend_style={"padding": "0px"},
# ),
# horizontal_scroll=True,
# )
# ),
# horizontal_scroll=True,
# )

0 comments on commit 0f8d986

Please sign in to comment.