@touchtech/baselayer-ui 8.1.5 → 8.1.6
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/dist/components/Table/Table.d.ts +8 -1
- package/dist/components/Table/TableHeader.d.ts +2 -1
- package/dist/components/Table/TableHeaderCell.d.ts +7 -0
- package/dist/constants/Table.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/styles.css +32 -11
- package/dist/types/table.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { SortOrder } from "../../types/table";
|
|
2
3
|
export type ColumnType = {
|
|
3
4
|
key: string;
|
|
4
5
|
title: JSX.Element | string;
|
|
@@ -6,6 +7,10 @@ export type ColumnType = {
|
|
|
6
7
|
dataIndex: string;
|
|
7
8
|
render?: (data: Record<string, any> | string) => JSX.Element;
|
|
8
9
|
width?: string;
|
|
10
|
+
defaultSortOrder?: SortOrder;
|
|
11
|
+
sorted?: boolean;
|
|
12
|
+
sortable?: boolean;
|
|
13
|
+
onSort?: (sortOrder: string) => void;
|
|
9
14
|
};
|
|
10
15
|
type Props = {
|
|
11
16
|
columns: ColumnType[];
|
|
@@ -19,11 +24,13 @@ type Props = {
|
|
|
19
24
|
pageSize?: number;
|
|
20
25
|
placeholder?: React.ReactElement;
|
|
21
26
|
rowHeight?: number;
|
|
27
|
+
headerHeight?: number;
|
|
22
28
|
disableLazyLoader?: boolean;
|
|
23
29
|
activeRows?: Record<string, any>;
|
|
24
30
|
itemsCount?: number;
|
|
25
31
|
isHeaderSticky?: boolean;
|
|
26
32
|
hasVirtualScroll?: boolean;
|
|
33
|
+
className?: string;
|
|
27
34
|
};
|
|
28
|
-
declare function Table({ columns, dataSource, onRowClick, hasArrow, onLoadMore, page, setPage, pageSize, tableHeight, placeholder, rowHeight, disableLazyLoader, activeRows, itemsCount, isHeaderSticky, hasVirtualScroll, }: Props): JSX.Element;
|
|
35
|
+
declare function Table({ columns, dataSource, onRowClick, hasArrow, onLoadMore, page, setPage, pageSize, tableHeight, placeholder, rowHeight, headerHeight, disableLazyLoader, activeRows, itemsCount, isHeaderSticky, hasVirtualScroll, className, }: Props): JSX.Element;
|
|
29
36
|
export default Table;
|
|
@@ -4,6 +4,7 @@ type Props = {
|
|
|
4
4
|
columns: ColumnType[];
|
|
5
5
|
scrollTop: number;
|
|
6
6
|
isHeaderSticky?: boolean;
|
|
7
|
+
headerHeight?: number;
|
|
7
8
|
};
|
|
8
|
-
declare function TableHeader({ columns, scrollTop, isHeaderSticky }: Props): JSX.Element;
|
|
9
|
+
declare function TableHeader({ columns, scrollTop, isHeaderSticky, headerHeight, }: Props): JSX.Element;
|
|
9
10
|
export default TableHeader;
|