@visns-studio/visns-components 1.5.11 → 1.5.12
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.
|
@@ -150,7 +150,15 @@ const DataGrid = forwardRef(
|
|
|
150
150
|
const [dataReload, setDataReload] = useState(0);
|
|
151
151
|
const [dSearch, setDSearch] = useState("");
|
|
152
152
|
const data = useCallback(
|
|
153
|
-
(params) =>
|
|
153
|
+
(params) => {
|
|
154
|
+
const sqlResult = loadData(params, dSearch, ajaxSetting);
|
|
155
|
+
|
|
156
|
+
if (setFilterData && params.filterValue) {
|
|
157
|
+
setFilterData([params.filterValue]);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
return sqlResult;
|
|
161
|
+
},
|
|
154
162
|
[ajaxSetting, dataReload, dSearch]
|
|
155
163
|
);
|
|
156
164
|
const [filterDataSource, setFilterDataSource] = useState([]);
|
|
@@ -173,6 +181,10 @@ const DataGrid = forwardRef(
|
|
|
173
181
|
},
|
|
174
182
|
}));
|
|
175
183
|
|
|
184
|
+
const handleFilterChange = (d) => {
|
|
185
|
+
setFilterValue(d);
|
|
186
|
+
};
|
|
187
|
+
|
|
176
188
|
const handleChangeSearch = (e) => {
|
|
177
189
|
const { value } = e.target;
|
|
178
190
|
setSearch(value);
|
|
@@ -1522,6 +1534,7 @@ const DataGrid = forwardRef(
|
|
|
1522
1534
|
|
|
1523
1535
|
useEffect(() => {
|
|
1524
1536
|
if (setFilterData) {
|
|
1537
|
+
console.info(filterValue);
|
|
1525
1538
|
setFilterData(filterValue);
|
|
1526
1539
|
}
|
|
1527
1540
|
}, [filterValue]);
|
package/package.json
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-dom": "^17.0.1"
|
|
36
36
|
},
|
|
37
37
|
"name": "@visns-studio/visns-components",
|
|
38
|
-
"version": "1.5.
|
|
38
|
+
"version": "1.5.12",
|
|
39
39
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
40
40
|
"main": "index.js",
|
|
41
41
|
"devDependencies": {},
|