From e19ace41352bfc16e2a8dbae76071d3534cc78ea Mon Sep 17 00:00:00 2001 From: metonym Date: Sun, 17 Apr 2022 09:03:05 -0700 Subject: [PATCH] docs(data-table): add "Sticky header" example (#1241) * docs(data-table): add "Sticky header" example * docs(link): add note on disabled link --- docs/src/pages/components/DataTable.svx | 23 +++++++++++++++++++++++ docs/src/pages/components/Link.svx | 2 ++ 2 files changed, 25 insertions(+) diff --git a/docs/src/pages/components/DataTable.svx b/docs/src/pages/components/DataTable.svx index 495e3cfe..3fef0c40 100644 --- a/docs/src/pages/components/DataTable.svx +++ b/docs/src/pages/components/DataTable.svx @@ -328,6 +328,29 @@ title="Load balancers" description="Your organization's active load balancers." ]}" /> +### Sticky header + +Set `stickyHeader` to `true` for the header to be fixed in place. + +A maximum height will applied to the datatable to force a scrollbar. + + ({ + id: i, + name: "Load Balancer " + (i + 1), + protocol: "HTTP", + port: i % 3 ? (i % 2 ? 3000 : 80) : 443, + rule: i % 3 ? "Round robin" : "DNS delegation", + }))} +/> + ### With toolbar Carbon Design System