es-grid-template 1.8.25 → 1.8.27
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/LICENSE +21 -21
- package/README.md +1 -1
- package/assets/index.scss +1170 -1170
- package/es/grid-component/hooks/constant.js +6 -6
- package/es/grid-component/hooks/useColumns.d.ts +3 -1
- package/es/grid-component/styles.scss +1437 -1437
- package/es/table-component/TableContainerEdit.js +1 -1
- package/es/table-component/body/TableBodyCell.js +17 -9
- package/es/table-component/body/TableBodyRow.js +2 -2
- package/es/table-component/header/TableHeadCell2.js +6 -3
- package/es/table-component/hook/constant.js +6 -6
- package/es/table-component/hook/useColumns.js +5 -2
- package/es/table-component/hook/utils.d.ts +1 -1
- package/es/table-component/hook/utils.js +42 -7
- package/es/table-component/style.scss +1220 -1220
- package/es/table-component/table/Grid.js +4 -0
- package/es/table-component/type.d.ts +2 -0
- package/lib/grid-component/hooks/constant.js +6 -6
- package/lib/grid-component/hooks/useColumns.d.ts +3 -1
- package/lib/grid-component/styles.scss +1437 -1437
- package/lib/table-component/TableContainerEdit.js +1 -1
- package/lib/table-component/body/TableBodyCell.js +17 -9
- package/lib/table-component/body/TableBodyRow.js +2 -2
- package/lib/table-component/header/TableHeadCell2.js +6 -3
- package/lib/table-component/hook/constant.js +6 -6
- package/lib/table-component/hook/useColumns.js +5 -2
- package/lib/table-component/hook/utils.d.ts +1 -1
- package/lib/table-component/hook/utils.js +42 -7
- package/lib/table-component/style.scss +1220 -1220
- package/lib/table-component/table/Grid.js +4 -0
- package/lib/table-component/type.d.ts +2 -0
- package/package.json +116 -116
- package/CHANGELOG.md +0 -6
|
@@ -42,6 +42,8 @@ const Grid = props => {
|
|
|
42
42
|
setMergedFilterKeys,
|
|
43
43
|
onSorter,
|
|
44
44
|
onFilter,
|
|
45
|
+
allowFilter,
|
|
46
|
+
allowSorter,
|
|
45
47
|
groupColumns,
|
|
46
48
|
// height= 700,
|
|
47
49
|
height,
|
|
@@ -119,11 +121,13 @@ const Grid = props => {
|
|
|
119
121
|
|
|
120
122
|
// ColumnSorting
|
|
121
123
|
// getSortedRowModel: getSortedRowModel(),
|
|
124
|
+
enableSorting: allowSorter !== false,
|
|
122
125
|
onSortingChange: setSorting,
|
|
123
126
|
enableMultiSort: sortMultiple,
|
|
124
127
|
isMultiSortEvent: () => sortMultiple ? true : false,
|
|
125
128
|
// ColumnSorting
|
|
126
129
|
|
|
130
|
+
enableFilters: allowFilter !== false,
|
|
127
131
|
onColumnFiltersChange: setColumnFilters,
|
|
128
132
|
onColumnOperatorChange: setOperator,
|
|
129
133
|
// getFilteredRowModel: getFilteredRowModel(),
|
|
@@ -212,6 +212,7 @@ export type TableProps<RecordType = AnyObject> = {
|
|
|
212
212
|
toolbarItems?: ToolbarItem[];
|
|
213
213
|
showColumnChoose?: boolean;
|
|
214
214
|
showAdvanceFilter?: boolean;
|
|
215
|
+
allowFilter?: boolean;
|
|
215
216
|
onFilter?: (query: {
|
|
216
217
|
field: string;
|
|
217
218
|
key: string;
|
|
@@ -219,6 +220,7 @@ export type TableProps<RecordType = AnyObject> = {
|
|
|
219
220
|
predicate: 'and' | 'or';
|
|
220
221
|
value: any;
|
|
221
222
|
}[]) => void;
|
|
223
|
+
allowSorter?: boolean;
|
|
222
224
|
onSorter?: (args: Sorter[]) => void;
|
|
223
225
|
selectionSettings?: SelectionSettings;
|
|
224
226
|
rowSelection?: RowSelection<RecordType>;
|
|
@@ -220,16 +220,16 @@ const optionFontSize = exports.optionFontSize = [{
|
|
|
220
220
|
label: '48'
|
|
221
221
|
}];
|
|
222
222
|
|
|
223
|
-
/**
|
|
224
|
-
* Sort order for BaseTable
|
|
223
|
+
/**
|
|
224
|
+
* Sort order for BaseTable
|
|
225
225
|
*/
|
|
226
226
|
const SortOrder = {
|
|
227
|
-
/**
|
|
228
|
-
* Sort data in ascending order
|
|
227
|
+
/**
|
|
228
|
+
* Sort data in ascending order
|
|
229
229
|
*/
|
|
230
230
|
ascend: 'Ascending',
|
|
231
|
-
/**
|
|
232
|
-
* Sort data in descending order
|
|
231
|
+
/**
|
|
232
|
+
* Sort data in descending order
|
|
233
233
|
*/
|
|
234
234
|
descend: 'Descending'
|
|
235
235
|
};
|
|
@@ -15,5 +15,7 @@ interface UseColumnsConfig<RecordType> {
|
|
|
15
15
|
rowKey?: any;
|
|
16
16
|
onMouseHover?: any;
|
|
17
17
|
}
|
|
18
|
-
declare const useColumns: <RecordType extends AnyObject = AnyObject>(config: UseColumnsConfig<RecordType>) => readonly [
|
|
18
|
+
declare const useColumns: <RecordType extends AnyObject = AnyObject>(config: UseColumnsConfig<RecordType>) => readonly [
|
|
19
|
+
any
|
|
20
|
+
];
|
|
19
21
|
export default useColumns;
|