@ssplib/react-components 0.0.230 → 0.0.232
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.
|
@@ -58,6 +58,7 @@ let isExpandAll = false;
|
|
|
58
58
|
let localTableName = '';
|
|
59
59
|
let orderAsc = false;
|
|
60
60
|
let filtersFuncData = {};
|
|
61
|
+
let localTableNameCache = '';
|
|
61
62
|
function Table({ mediaQueryLG, columns, fetchFunc, emptyMsg = {
|
|
62
63
|
user: 'Nenhum dado encontrado',
|
|
63
64
|
public: 'Nenhum dado encontrado',
|
|
@@ -87,7 +88,14 @@ hideTitleCSV = false, csvExcludeUpper = [], multipleDataPath = '', expandTextMax
|
|
|
87
88
|
const filterContainer = (0, react_1.useRef)(null);
|
|
88
89
|
const lg = (0, material_1.useMediaQuery)(theme.breakpoints.up(2000));
|
|
89
90
|
localTableName = `tableFilter_${id}`;
|
|
91
|
+
localTableNameCache = `tableFilterCache_${id}`;
|
|
90
92
|
filtersFuncData = filtersFunc !== null && filtersFunc !== void 0 ? filtersFunc : {};
|
|
93
|
+
if (!localStorage.getItem(localTableNameCache))
|
|
94
|
+
localStorage.setItem(localTableNameCache, JSON.stringify(filters));
|
|
95
|
+
if (localStorage.getItem(localTableNameCache) !== JSON.stringify(filters)) {
|
|
96
|
+
localStorage.setItem(localTableNameCache, JSON.stringify(filters));
|
|
97
|
+
localStorage.removeItem(localTableName);
|
|
98
|
+
}
|
|
91
99
|
(0, react_1.useEffect)(() => {
|
|
92
100
|
setError(null);
|
|
93
101
|
if (userLoaded || !useKC) {
|