jattac.libs.web.responsive-table 0.2.14 → 0.2.16
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.
- package/README.md +4 -2
- package/dist/UI/InfiniteTable.d.ts +6 -16
- package/dist/index.js +113 -1060
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -501,9 +501,11 @@ const FilterableTable = () => {
|
|
|
501
501
|
|
|
502
502
|
#### `InfiniteScrollPlugin`
|
|
503
503
|
|
|
504
|
-
Enables
|
|
504
|
+
Enables a simple infinite scroll for loading more data as the user scrolls to the bottom of the table. This is useful for progressively loading data from an API without needing traditional pagination buttons.
|
|
505
505
|
|
|
506
|
-
> **Important:** To enable infinite
|
|
506
|
+
> **Important:** To enable infinite scroll, you **must** give the table a bounded height. This is done by passing the `maxHeight` prop to the `<ResponsiveTable>`. This prop creates a scrollable container for the table body, which is required for the scroll detection to work.
|
|
507
|
+
|
|
508
|
+
> **Performance Note:** This implementation renders all loaded rows into the DOM to guarantee correct column alignment and simplicity. It is **not a virtualized list**. For extremely large datasets (many thousands of rows), performance may degrade as more rows are loaded. It is best suited for scenarios where loading a few hundred up to a couple thousand rows is expected.
|
|
507
509
|
|
|
508
510
|
**Configuration (via `infiniteScrollProps` on `ResponsiveTable`):**
|
|
509
511
|
|
|
@@ -34,28 +34,23 @@ interface IState<TData> {
|
|
|
34
34
|
processedData: TData[];
|
|
35
35
|
isLoadingMore: boolean;
|
|
36
36
|
isHeaderSticky: boolean;
|
|
37
|
-
columnWidths: number[];
|
|
38
37
|
}
|
|
39
38
|
declare class InfiniteTable<TData> extends Component<IProps<TData>, IState<TData>> {
|
|
40
39
|
private debouncedResize;
|
|
41
40
|
private tableContainerRef;
|
|
42
41
|
private headerRef;
|
|
43
|
-
private resizeObserver;
|
|
44
42
|
constructor(props: IProps<TData>);
|
|
45
|
-
private get mobileBreakpoint();
|
|
46
|
-
private debounce;
|
|
47
|
-
private get data();
|
|
48
|
-
private get noDataSvg();
|
|
49
|
-
private get hasData();
|
|
50
|
-
private get noDataComponent();
|
|
51
43
|
componentDidMount(): void;
|
|
52
44
|
componentWillUnmount(): void;
|
|
53
45
|
componentDidUpdate(prevProps: IProps<TData>): void;
|
|
54
|
-
private
|
|
46
|
+
private debounce;
|
|
47
|
+
handleResize: () => void;
|
|
55
48
|
private handleScroll;
|
|
56
49
|
private initializePlugins;
|
|
57
50
|
private processData;
|
|
58
|
-
|
|
51
|
+
private get data();
|
|
52
|
+
private get hasData();
|
|
53
|
+
private get noDataComponent();
|
|
59
54
|
private getColumnDefinition;
|
|
60
55
|
private getRawColumnDefinition;
|
|
61
56
|
private onHeaderClickCallback;
|
|
@@ -63,13 +58,8 @@ declare class InfiniteTable<TData> extends Component<IProps<TData>, IState<TData
|
|
|
63
58
|
private getHeaderProps;
|
|
64
59
|
private get rowClickFunction();
|
|
65
60
|
private get rowClickStyle();
|
|
66
|
-
private get tableFooter();
|
|
67
|
-
private get mobileFooter();
|
|
68
|
-
private get skeletonView();
|
|
69
61
|
private get mobileView();
|
|
70
62
|
private get largeScreenView();
|
|
71
|
-
|
|
72
|
-
private renderPluginFooters;
|
|
73
|
-
render(): string | number | boolean | Iterable<React.ReactNode> | React.JSX.Element | null | undefined;
|
|
63
|
+
render(): React.JSX.Element;
|
|
74
64
|
}
|
|
75
65
|
export default InfiniteTable;
|