onekijs-ui 0.17.1 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102,6 +102,7 @@ export type TableConfig<T = any, I extends TableItem<T> = TableItem<T>> = {
102
102
  RowComponent?: React.FC<TableBodyRowProps<T, I>>;
103
103
  sortable?: boolean;
104
104
  stripRows?: boolean;
105
+ tail?: boolean;
105
106
  };
106
107
  export type TableController<T = any, I extends TableItem<T> = TableItem<T>, S extends TableState<T, I> = TableState<T, I>> = Collection<T, I, S> & {
107
108
  addColumn(column: TableColumn<T, I>, position?: number): void;
package/dist/index.js CHANGED
@@ -8958,7 +8958,7 @@ const TableNotFoundComponent = ({ text = 'No data' }) => {
8958
8958
  const TableBodyComponent = ({ className, tableRef, contentRef }) => {
8959
8959
  const service = useTableService();
8960
8960
  const state = useTableState();
8961
- const { autoRefresh, follow, height, increment, onRowClick, onRowEnter, onRowLeave, paddingEnd, paddingStart, parentRef, preload, RowComponent = TableBodyRowComponent, rowClassName, LoadingComponent = TableLoadingComponent$1, NotFoundComponent = TableNotFoundComponent, } = useTableConfig();
8961
+ const { autoRefresh, follow, height, increment, onRowClick, onRowEnter, onRowLeave, paddingEnd, paddingStart, parentRef, preload, RowComponent = TableBodyRowComponent, rowClassName, LoadingComponent = TableLoadingComponent$1, NotFoundComponent = TableNotFoundComponent, tail, } = useTableConfig();
8962
8962
  const itemHeight = React.useCallback(() => {
8963
8963
  return 20;
8964
8964
  }, []);
@@ -8988,7 +8988,7 @@ const TableBodyComponent = ({ className, tableRef, contentRef }) => {
8988
8988
  if (service.status === onekijsFramework.LoadingStatus.Loaded && items.length === 0 && NotFoundComponent) {
8989
8989
  return React.createElement(NotFoundComponent, null);
8990
8990
  }
8991
- return (React.createElement(ListBodyComponent, { autoRefresh: autoRefresh, className: addClassname('o-table-body', className), follow: follow, height: height, ItemComponent: ItemComponentRef.current, items: items, onItemSelect: onRowClick, onItemHighlight: onRowEnter, onItemUnhighlight: onRowLeave, parentRef: parentRef || tableRef, bodyRef: contentRef, service: service, state: state, totalSize: totalSize, virtualItems: isVirtual ? virtualItems : undefined }));
8991
+ return (React.createElement(ListBodyComponent, { autoRefresh: autoRefresh, className: addClassname('o-table-body', className), follow: follow, height: height, ItemComponent: ItemComponentRef.current, items: items, onItemSelect: onRowClick, onItemHighlight: onRowEnter, onItemUnhighlight: onRowLeave, parentRef: parentRef || tableRef, bodyRef: contentRef, service: service, state: state, totalSize: totalSize, tail: tail, virtualItems: isVirtual ? virtualItems : undefined }));
8992
8992
  };
8993
8993
  TableBodyComponent.displayName = 'TableBody';
8994
8994
 
@@ -9568,7 +9568,7 @@ const ExpandedCellComponent = ({ item, className }) => {
9568
9568
  React.createElement(TogglerIcon, { open: item.expanded, model: "plus", color: "primary" })));
9569
9569
  };
9570
9570
 
9571
- const ControllerTableComponent = ({ autoRefresh, controller, className, bodyClassName, BodyComponent = TableBodyComponent, ExpandedComponent, filterable, fit, fixHeader = true, follow, grow, FooterComponent = TableFooterComponent, footerClassName, header = true, headerClassName, HeaderComponent = TableHeaderComponent, increment, LoadingComponent, LoadingRowComponent, NotFoundComponent, footer = false, height, highlightRow, onRowClick, onRowEnter, onRowLeave, onRowOver, onRowOut, paddingEnd, paddingStart, parentRef, preload, rowClassName, RowComponent, sortable, stripRows, }) => {
9571
+ const ControllerTableComponent = ({ autoRefresh, controller, className, bodyClassName, BodyComponent = TableBodyComponent, ExpandedComponent, filterable, fit, fixHeader = true, follow, grow, FooterComponent = TableFooterComponent, footerClassName, header = true, headerClassName, HeaderComponent = TableHeaderComponent, increment, LoadingComponent, LoadingRowComponent, NotFoundComponent, footer = false, height, highlightRow, onRowClick, onRowEnter, onRowLeave, onRowOver, onRowOut, paddingEnd, paddingStart, parentRef, preload, rowClassName, RowComponent, sortable, stripRows, tail, }) => {
9572
9572
  const classNames = addClassname('o-table', className);
9573
9573
  const { columns, items } = controller.state;
9574
9574
  const contentRef = React.useRef(null);
@@ -9611,6 +9611,7 @@ const ControllerTableComponent = ({ autoRefresh, controller, className, bodyClas
9611
9611
  RowComponent,
9612
9612
  sortable,
9613
9613
  stripRows,
9614
+ tail
9614
9615
  };
9615
9616
  }, [
9616
9617
  autoRefresh,
@@ -9648,6 +9649,7 @@ const ControllerTableComponent = ({ autoRefresh, controller, className, bodyClas
9648
9649
  RowComponent,
9649
9650
  sortable,
9650
9651
  stripRows,
9652
+ tail,
9651
9653
  ]);
9652
9654
  service.config = config;
9653
9655
  React.useEffect(() => {