@visns-studio/visns-components 3.9.1 → 3.9.2
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/components/crm/DataGrid.jsx +5 -42
- package/package.json +2 -2
|
@@ -158,7 +158,6 @@ const DataGrid = forwardRef(
|
|
|
158
158
|
setFormData(form);
|
|
159
159
|
}, [form]);
|
|
160
160
|
/** Table States */
|
|
161
|
-
const [dataReload, setDataReload] = useState(0);
|
|
162
161
|
const [dSearch, setDSearch] = useState('');
|
|
163
162
|
const dataSource = useCallback(
|
|
164
163
|
(params) => {
|
|
@@ -176,7 +175,7 @@ const DataGrid = forwardRef(
|
|
|
176
175
|
|
|
177
176
|
return sqlResult;
|
|
178
177
|
},
|
|
179
|
-
[ajaxSetting,
|
|
178
|
+
[ajaxSetting, dSearch]
|
|
180
179
|
);
|
|
181
180
|
const [filterDataSource, setFilterDataSource] = useState([]);
|
|
182
181
|
const [filterValue, setFilterValue] = useState([]);
|
|
@@ -235,13 +234,7 @@ const DataGrid = forwardRef(
|
|
|
235
234
|
if (res.data.error === '') {
|
|
236
235
|
toast.success('Timer has been updated.');
|
|
237
236
|
|
|
238
|
-
|
|
239
|
-
const max = 999999999;
|
|
240
|
-
const randomNumber = Math.floor(
|
|
241
|
-
Math.random() * (max - min + 1) + min
|
|
242
|
-
);
|
|
243
|
-
|
|
244
|
-
setDataReload(randomNumber);
|
|
237
|
+
handleReload();
|
|
245
238
|
} else {
|
|
246
239
|
toast.error(res.data.error);
|
|
247
240
|
}
|
|
@@ -414,15 +407,7 @@ const DataGrid = forwardRef(
|
|
|
414
407
|
deleteForm.payload,
|
|
415
408
|
(result) => {
|
|
416
409
|
if (result.error === '') {
|
|
417
|
-
|
|
418
|
-
const max = 999999999;
|
|
419
|
-
const randomNumber = Math.floor(
|
|
420
|
-
Math.random() *
|
|
421
|
-
(max - min + 1) +
|
|
422
|
-
min
|
|
423
|
-
);
|
|
424
|
-
|
|
425
|
-
setDataReload(randomNumber);
|
|
410
|
+
handleReload();
|
|
426
411
|
|
|
427
412
|
toast.success(
|
|
428
413
|
`The selected item has been deleted.`
|
|
@@ -506,15 +491,7 @@ const DataGrid = forwardRef(
|
|
|
506
491
|
{},
|
|
507
492
|
function (result) {
|
|
508
493
|
if (result.error === '') {
|
|
509
|
-
|
|
510
|
-
const max = 999999999;
|
|
511
|
-
const randomNumber = Math.floor(
|
|
512
|
-
Math.random() *
|
|
513
|
-
(max - min + 1) +
|
|
514
|
-
min
|
|
515
|
-
);
|
|
516
|
-
|
|
517
|
-
setDataReload(randomNumber);
|
|
494
|
+
handleReload();
|
|
518
495
|
|
|
519
496
|
toast.success(String(s.title));
|
|
520
497
|
} else {
|
|
@@ -548,14 +525,6 @@ const DataGrid = forwardRef(
|
|
|
548
525
|
};
|
|
549
526
|
|
|
550
527
|
const handleReload = () => {
|
|
551
|
-
// const min = 0;
|
|
552
|
-
// const max = 999999999;
|
|
553
|
-
// const randomNumber = Math.floor(
|
|
554
|
-
// Math.random() * (max - min + 1) + min
|
|
555
|
-
// );
|
|
556
|
-
|
|
557
|
-
// setDataReload(randomNumber);
|
|
558
|
-
|
|
559
528
|
gridRef.current.paginationProps.reload();
|
|
560
529
|
};
|
|
561
530
|
|
|
@@ -1059,13 +1028,7 @@ const DataGrid = forwardRef(
|
|
|
1059
1028
|
});
|
|
1060
1029
|
|
|
1061
1030
|
if (res.data.error === '') {
|
|
1062
|
-
|
|
1063
|
-
const max = 999999999;
|
|
1064
|
-
const randomNumber = Math.floor(
|
|
1065
|
-
Math.random() * (max - min + 1) + min
|
|
1066
|
-
);
|
|
1067
|
-
|
|
1068
|
-
setDataReload(randomNumber);
|
|
1031
|
+
handleReload();
|
|
1069
1032
|
} else {
|
|
1070
1033
|
toast.error(res.data.error);
|
|
1071
1034
|
}
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"awesome-debounce-promise": "^2.1.0",
|
|
13
13
|
"axios": "^1.6.8",
|
|
14
14
|
"file-saver": "^2.0.5",
|
|
15
|
-
"framer-motion": "^11.1.
|
|
15
|
+
"framer-motion": "^11.1.8",
|
|
16
16
|
"html-react-parser": "^5.1.10",
|
|
17
17
|
"lodash": "^4.17.21",
|
|
18
18
|
"lodash.debounce": "^4.0.8",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"react-dom": "^17.0.1"
|
|
55
55
|
},
|
|
56
56
|
"name": "@visns-studio/visns-components",
|
|
57
|
-
"version": "3.9.
|
|
57
|
+
"version": "3.9.2",
|
|
58
58
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
59
59
|
"main": "index.js",
|
|
60
60
|
"scripts": {
|