@monolith-forensics/monolith-ui 1.2.96 → 1.2.97
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.
|
@@ -116,6 +116,9 @@ const TableProvider = (_a) => {
|
|
|
116
116
|
const runSearch = (searchText) => {
|
|
117
117
|
setSearch(searchText);
|
|
118
118
|
};
|
|
119
|
+
const clearSearch = () => {
|
|
120
|
+
setSearch("");
|
|
121
|
+
};
|
|
119
122
|
const sortData = (sortState) => {
|
|
120
123
|
// sort data
|
|
121
124
|
return props.data.sort((a, b) => {
|
|
@@ -418,6 +421,7 @@ const TableProvider = (_a) => {
|
|
|
418
421
|
selectAllRows,
|
|
419
422
|
clearSelections,
|
|
420
423
|
runSearch,
|
|
424
|
+
clearSearch,
|
|
421
425
|
};
|
|
422
426
|
}
|
|
423
427
|
}, [columnState]);
|
|
@@ -503,6 +507,7 @@ const TableProvider = (_a) => {
|
|
|
503
507
|
clearSelections,
|
|
504
508
|
toggleColumnVisibility,
|
|
505
509
|
runSearch,
|
|
510
|
+
clearSearch,
|
|
506
511
|
handleFilterChange,
|
|
507
512
|
filterState,
|
|
508
513
|
compactState,
|
package/dist/Table/types.d.ts
CHANGED
|
@@ -126,6 +126,7 @@ export type TableContextType = {
|
|
|
126
126
|
toggleCompact: () => void;
|
|
127
127
|
toggleColumnVisibility: (dataField: string) => void;
|
|
128
128
|
runSearch: (query: string) => void;
|
|
129
|
+
clearSearch: () => void;
|
|
129
130
|
handleFilterChange: (query: Query) => void;
|
|
130
131
|
selectAllRows: () => void;
|
|
131
132
|
clearSelections: () => void;
|
|
@@ -301,5 +302,6 @@ export type TableInstance = {
|
|
|
301
302
|
deselectRow: (row: any) => void;
|
|
302
303
|
selectAllRows: () => void;
|
|
303
304
|
runSearch: (query: string) => void;
|
|
305
|
+
clearSearch: () => void;
|
|
304
306
|
clearSelections: () => void;
|
|
305
307
|
};
|