Skip to content

Commit

Permalink
feat: expose rollup group behaviour as dh.ui option for UI Table (#738)
Browse files Browse the repository at this point in the history
Closes deephaven/web-client-ui#2129 (May have
to move this ticket to plugins repo)

Assumes changes to be made in
deephaven/web-client-ui#2183
  • Loading branch information
AkshatJawne authored Sep 6, 2024
1 parent 920b65f commit 1807862
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions plugins/ui/src/deephaven/ui/components/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def table(
on_column_double_press: ColumnPressCallback | None = None,
quick_filters: dict[ColumnName, QuickFilterExpression] | None = None,
show_quick_filters: bool = False,
show_grouping_column: bool = True,
show_search: bool = False,
reverse: bool = False,
front_columns: list[ColumnName] | None = None,
Expand Down Expand Up @@ -63,6 +64,7 @@ def table(
The callback is invoked with the column name.
quick_filters: The quick filters to apply to the table. Dictionary of column name to filter value.
show_quick_filters: Whether to show the quick filter bar by default.
show_grouping_column: Whether to show the grouping column by default for rollup tables.
show_search: Whether to show the search bar by default.
reverse: Whether to reverse the table rows. Applied after any sorts.
front_columns: The columns to pin to the front of the table. These will not be movable by the user.
Expand Down
4 changes: 3 additions & 1 deletion plugins/ui/src/js/src/elements/UITable/UITable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export function UITable({
table: exportedTable,
showSearch: showSearchBar,
showQuickFilters,
showGroupingColumn,
reverse,
frontColumns,
backColumns,
Expand Down Expand Up @@ -238,7 +239,7 @@ export function UITable({
? TableUtils.REVERSE_TYPE.POST_SORT
: TableUtils.REVERSE_TYPE.NONE,
density,
settings,
settings: { ...settings, showExtraGroupColumn: showGroupingColumn },
onContextMenu,
}) satisfies Partial<IrisGridProps>,
[
Expand All @@ -251,6 +252,7 @@ export function UITable({
reverse,
density,
settings,
showGroupingColumn,
onContextMenu,
]
);
Expand Down
1 change: 1 addition & 0 deletions plugins/ui/src/js/src/elements/UITable/UITableUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export type UITableProps = {
sorts?: DehydratedSort[];
showSearch: boolean;
showQuickFilters: boolean;
showGroupingColumn: boolean;
reverse: boolean;
frontColumns?: string[];
backColumns?: string[];
Expand Down

0 comments on commit 1807862

Please sign in to comment.