Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions apps/www/src/content/docs/components/datatable/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ function MyTable() {

Columns can be configured with various options:

**Performance:** Pass a stable `columns` reference (e.g. define at module scope or wrap in `useMemo`) so the table doesn't recompute filters, grouping, or sort state on every render.

```ts
interface DataTableColumnDef<TData, TValue> {
accessorKey: string; // Key to access data
Expand Down
10 changes: 5 additions & 5 deletions packages/raystack/components/data-table/data-table.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.toolbar {
padding: var(--rs-space-3) var(--rs-space-7) var(--rs-space-3)
var(--rs-space-5);
padding: var(--rs-space-3) 0;
align-self: stretch;

border-bottom: 0.5px solid var(--rs-color-border-base-primary);
Expand All @@ -21,12 +20,13 @@
.display-popover-properties-select {
width: var(--select-width);
}

.display-popover-properties-select[with-icon-button] {
/* Reduce Icon button with "--rs-space-7" and flex gap "--rs-space-2" */
width: calc(var(--select-width) - var(--rs-space-7) - var(--rs-space-2));
}

.display-popover-properties-select > span {
.display-popover-properties-select>span {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
Expand Down Expand Up @@ -142,7 +142,7 @@
align-items: center;
background: var(--rs-color-background-base-secondary);
font-weight: 500;
padding: var(--rs-space-3) var(--rs-space-4);
padding: var(--rs-space-3);
}

.stickyLoaderContainer {
Expand All @@ -154,4 +154,4 @@

.loaderRow {
position: relative;
}
}
6 changes: 3 additions & 3 deletions packages/raystack/components/table/table.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
font-size: var(--rs-font-size-small);
font-style: normal;
font-weight: var(--rs-font-weight-medium);
line-height: var(--rs-line-height-small); /* 133.333% */
line-height: var(--rs-line-height-small);
letter-spacing: var(--rs-letter-spacing-small);

text-align: left;
Expand Down Expand Up @@ -57,12 +57,12 @@

.sectionHeader > th {
color: var(--rs-color-foreground-base-primary);
padding: var(--rs-space-3) var(--rs-space-7);
padding: var(--rs-space-3);

/* Body/Small Plus */
font-size: var(--rs-font-size-small);
font-style: normal;
font-weight: var(--rs-font-weight-medium);
line-height: var(--rs-line-height-small); /* 133.333% */
line-height: var(--rs-line-height-small);
letter-spacing: var(--rs-letter-spacing-small);
}