@@ -30,7 +30,7 @@ import { useRowDisableSelection } from '@ui5/webcomponents-react/lib/AnalyticalT
3030 title = " Data Display / AnalyticalTable"
3131 component = { AnalyticalTable }
3232 args = { {
33- data: generateData (1000 ),
33+ data: generateData (500 ),
3434 columns: [
3535 {
3636 Header: ' Name' ,
@@ -362,7 +362,7 @@ For more details on this behavior you can double check the [react-table docs](ht
362362## Tree Table
363363
364364<Canvas >
365- <Story name = " Tree Table" args = { { data: generateData (20 , true ), isTreeTable: true }} >
365+ <Story name = " Tree Table" args = { { data: generateData (15 , true ), isTreeTable: true }} >
366366 { (args ) => <AnalyticalTable { ... args } />}
367367 </Story >
368368</Canvas >
@@ -471,12 +471,63 @@ const InfiniteScrollTable = (props) => {
471471## AnalyticalTable with subcomponents
472472
473473Adding custom subcomponents below table rows can be achieved by setting the ` renderRowSubComponent ` prop.
474- The prop expects a function with an optional parameter containing the ` row ` instance, there you can control which row should display subcomponents.
474+ The prop expects a function with an optional parameter containing the ` row ` instance, there you can control which row should display subcomponents. If you want to display the subcomponent at the bottom of the row without an expandable container, you can set the ` alwaysShowSubComponent ` prop to ` true ` .
475475
476476** Note:** When ` renderRowSubComponent ` is set, ` grouping ` is disabled.
477477
478+ <ArgsTable story = " with subcomponents" />
479+
478480<Canvas >
479- <Story name = " with subcomponents" args = { { data: generateData (100 ) }} >
481+ <Story
482+ name = " with subcomponents"
483+ args = { { data: generateData (50 ) }}
484+ argTypes = { {
485+ columns: { table: { disable: true } },
486+ data: { table: { disable: true } },
487+ title: { table: { disable: true } },
488+ extension: { table: { disable: true } },
489+ minRows: { table: { disable: true } },
490+ visibleRowCountMode: { table: { disable: true } },
491+ visibleRows: { table: { disable: true } },
492+ loading: { table: { disable: true } },
493+ noDataText: { table: { disable: true } },
494+ rowHeight: { table: { disable: true } },
495+ alternateRowColor: { table: { disable: true } },
496+ withRowHighlight: { table: { disable: true } },
497+ highlightField: { table: { disable: true } },
498+ filterable: { table: { disable: true } },
499+ sortable: { table: { disable: true } },
500+ groupable: { table: { disable: true } },
501+ groupBy: { table: { disable: true } },
502+ selectionBehavior: { table: { disable: true } },
503+ selectionMode: { table: { disable: true } },
504+ scaleWidthMode: { table: { disable: true } },
505+ columnOrder: { table: { disable: true } },
506+ infiniteScroll: { table: { disable: true } },
507+ infiniteScrollThreshold: { table: { disable: true } },
508+ onSort: { table: { disable: true } },
509+ onGroup: { table: { disable: true } },
510+ onRowSelected: { table: { disable: true } },
511+ onRowExpandChange: { table: { disable: true } },
512+ onColumnsReordered: { table: { disable: true } },
513+ onLoadMore: { table: { disable: true } },
514+ reactTableOptions: { table: { disable: true } },
515+ tableHooks: { table: { disable: true } },
516+ subRowsKey: { table: { disable: true } },
517+ selectedRowIds: { table: { disable: true } },
518+ isTreeTable: { table: { disable: true } },
519+ overscanCountHorizontal: { table: { disable: true } },
520+ overscanCount: { table: { disable: true } },
521+ NoDataComponent: { table: { disable: true } },
522+ LoadingComponent: { table: { disable: true } },
523+ style: { table: { disable: true } },
524+ className: { table: { disable: true } },
525+ tooltip: { table: { disable: true } },
526+ onRowClick: { table: { disable: true } },
527+ withNavigationHighlight: { table: { disable: true } },
528+ markNavigatedRow: { table: { disable: true } }
529+ }}
530+ >
480531 { (args ) => {
481532 const renderRowSubComponent = (row ) => {
482533 if (row .id === ' 0' ) {
@@ -520,7 +571,14 @@ The prop expects a function with an optional parameter containing the `row` inst
520571 </FlexBox >
521572 );
522573 };
523- return <AnalyticalTable data = { args .data } columns = { args .columns } renderRowSubComponent = { renderRowSubComponent } />;
574+ return (
575+ <AnalyticalTable
576+ data = { args .data }
577+ columns = { args .columns }
578+ renderRowSubComponent = { renderRowSubComponent }
579+ alwaysShowSubComponent = { args .alwaysShowSubComponent }
580+ />
581+ );
524582 }}
525583 </Story >
526584</Canvas >
@@ -571,7 +629,14 @@ const TableWithSubcomponents = (props) => {
571629 < / FlexBox>
572630 );
573631 };
574- return < AnalyticalTable data= {props .data } columns= {props .columns } renderRowSubComponent= {renderRowSubComponent} / > ;
632+ return (
633+ < AnalyticalTable
634+ data= {props .data }
635+ columns= {props .columns }
636+ renderRowSubComponent= {renderRowSubComponent}
637+ alwaysShowSubComponent= {false } // default value
638+ / >
639+ );
575640};
576641```
577642
@@ -623,6 +688,7 @@ By adding the `visibleRowCountMode` prop and setting it to `TableVisibleRowCount
623688 overscanCountHorizontal: { table: { disable: true } },
624689 overscanCount: { table: { disable: true } },
625690 renderRowSubComponent: { table: { disable: true } },
691+ alwaysShowSubComponent: { table: { disable: true } },
626692 NoDataComponent: { table: { disable: true } },
627693 LoadingComponent: { table: { disable: true } },
628694 style: { table: { disable: true } },
@@ -755,6 +821,7 @@ In the example below you can have a look at this behavior:
755821 overscanCountHorizontal: { table: { disable: true } },
756822 overscanCount: { table: { disable: true } },
757823 renderRowSubComponent: { table: { disable: true } },
824+ alwaysShowSubComponent: { table: { disable: true } },
758825 NoDataComponent: { table: { disable: true } },
759826 LoadingComponent: { table: { disable: true } },
760827 style: { table: { disable: true } },
0 commit comments