Skip to content

Commit

Permalink
Merge branch 'master' into fix/filter-bar-custom-filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusNotheis authored Sep 21, 2020
2 parents 999668f + 0ce8778 commit 9006460
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Title, Subtitle, Primary, Description, Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs/blocks';
import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs/blocks';
import { AnalyticalTable } from '@ui5/webcomponents-react/lib/AnalyticalTable';
import { createSelectArgTypes } from '../../../../../shared/stories/createSelectArgTypes';
import { TableScaleWidthMode } from '@ui5/webcomponents-react/lib/TableScaleWidthMode';
Expand All @@ -10,19 +10,15 @@ import '@ui5/webcomponents-icons/dist/icons/delete';
import '@ui5/webcomponents-icons/dist/icons/edit';
import '@ui5/webcomponents-icons/dist/icons/settings';
import { Button } from '@ui5/webcomponents-react/lib/Button';
import { Text } from '@ui5/webcomponents-react/lib/Text';
import { FlexBox } from '@ui5/webcomponents-react/lib/FlexBox';
import { TextAlign } from '@ui5/webcomponents-react/lib/TextAlign';
import { FlexBoxAlignItems } from '@ui5/webcomponents-react/lib/FlexBoxAlignItems';
import { FlexBoxJustifyContent } from '@ui5/webcomponents-react/lib/FlexBoxJustifyContent';
import { DefaultLoadingComponent } from './defaults/LoadingComponent';
import { DefaultNoDataComponent } from './defaults/NoDataComponent';

<Meta
title="Components / AnalyticalTable"
component={AnalyticalTable}
args={{
dataTree: generateData(20, true),
data: generateData(1000),
columns: [
{
Expand Down Expand Up @@ -109,7 +105,6 @@ import { DefaultNoDataComponent } from './defaults/NoDataComponent';
}}
argTypes={{
ref: { type: null },
dataTree: { type: null },
data: { type: null },
columns: { type: null },
reactTableOptions: { type: null },
Expand Down Expand Up @@ -275,12 +270,12 @@ This even works if you resize the browser window!
## Tree Table

<Canvas>
<Story name="Tree Table">
<Story name="Tree Table" args={{ data: generateData(20, true) }}>
{(args) => (
<AnalyticalTable
{...args}
title={args.title}
data={args.dataTree}
data={args.data}
columns={args.columns}
loading={args.loading}
sortable={args.sortable}
Expand Down
10 changes: 9 additions & 1 deletion packages/main/src/components/AnalyticalTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ export interface TableProps extends CommonProps {
groupBy?: string[];
selectionBehavior?: TableSelectionBehavior;
selectionMode?: TableSelectionMode;
/**
* Defines the column growing behaviour. Possible Values:
*
* - **Default**: Every column without fixed width gets the maximum available space of the table.
* - **Smart**: Every column gets the space it needs for displaying the full header text. If all headers need more space than the available table width, horizontal scrolling will be enabled. If there is space left, columns with a long content will get more space until there is no more table space left.
* - **Grow**: Every column gets the space it needs for displaying it's full header text and full content of all cells. If it requires more space than the table has, horizontal scrolling will be enabled.
*
*/
scaleWidthMode?: TableScaleWidthMode;
columnOrder?: string[];
infiniteScroll?: boolean;
Expand All @@ -113,7 +121,7 @@ export interface TableProps extends CommonProps {
/**
* Additional options which will be passed to [react-table´s useTable hook](https://react-table.tanstack.com/docs/api/useTable#table-options)
*/
reactTableOptions?: object;
reactTableOptions?: Record<string, unknown>;
tableHooks?: PluginHook<any>[];
subRowsKey?: string;
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/main/src/enums/TableScaleWidthMode.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export enum TableScaleWidthMode {
/*
* Every column without fixed width get's the maximum available space of the table
* Every column without fixed width gets the maximum available space of the table
*/
Default = 'Default',
/*
Expand All @@ -10,7 +10,7 @@ export enum TableScaleWidthMode {
*/
Smart = 'Smart',
/*
* Every column get's the space it needs for displaying it's full header text and full content of all cells.
* Every column gets the space it needs for displaying it's full header text and full content of all cells.
* If it requires more space than the table has, horizontal scrolling will be enabled.
*/
Grow = 'Grow'
Expand Down

0 comments on commit 9006460

Please sign in to comment.