@visns-studio/visns-components 4.3.3 → 4.3.5

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.
@@ -173,7 +173,9 @@ const DataGrid = forwardRef(
173
173
  useEffect(() => {
174
174
  setFormData(form);
175
175
  }, [form]);
176
+
176
177
  /** Table States */
178
+ const dataRef = useRef(null);
177
179
  const [dSearch, setDSearch] = useState('');
178
180
  const dataSource = useCallback(
179
181
  (params) => {
@@ -187,6 +189,8 @@ const DataGrid = forwardRef(
187
189
  setTotal(res.count);
188
190
  }
189
191
  setDataCount(res.count);
192
+
193
+ dataRef.current = res.data;
190
194
  });
191
195
 
192
196
  return sqlResult;
@@ -684,10 +688,18 @@ const DataGrid = forwardRef(
684
688
  try {
685
689
  toast.success('Starting export please wait...');
686
690
 
687
- const res = await Download(form.export.url, 'POST', {
688
- filter: filterValue,
689
- paramId: paramValue || '',
690
- });
691
+ let payload;
692
+
693
+ if (form.export.useData) {
694
+ payload = { data: dataRef.current };
695
+ } else {
696
+ payload = {
697
+ filter: filterValue,
698
+ paramId: paramValue || '',
699
+ };
700
+ }
701
+
702
+ const res = await Download(form.export.url, 'POST', payload);
691
703
 
692
704
  if (res.data.error) {
693
705
  toast.error(res.data.error);
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "axios": "^1.7.2",
14
14
  "dayjs": "^1.11.11",
15
15
  "file-saver": "^2.0.5",
16
- "framer-motion": "^11.2.12",
16
+ "framer-motion": "^11.2.14",
17
17
  "html-react-parser": "^5.1.10",
18
18
  "lodash": "^4.17.21",
19
19
  "lodash.debounce": "^4.0.8",
@@ -25,7 +25,7 @@
25
25
  "react-color": "^2.19.3",
26
26
  "react-confirm-alert": "^3.0.6",
27
27
  "react-copy-to-clipboard": "^5.1.0",
28
- "react-datepicker": "^7.2.0",
28
+ "react-datepicker": "^7.3.0",
29
29
  "react-dropzone": "^14.2.3",
30
30
  "react-grid-gallery": "^1.0.1",
31
31
  "react-number-format": "^5.4.0",
@@ -40,7 +40,7 @@
40
40
  "react-to-print": "^2.15.1",
41
41
  "react-toastify": "^10.0.5",
42
42
  "react-toggle": "^4.1.3",
43
- "react-tooltip": "^5.27.0",
43
+ "react-tooltip": "^5.27.1",
44
44
  "react-window": "^1.8.10",
45
45
  "reactjs-popup": "^2.0.6",
46
46
  "truncate": "^3.0.0",
@@ -57,7 +57,7 @@
57
57
  "react-dom": "^17.0.1"
58
58
  },
59
59
  "name": "@visns-studio/visns-components",
60
- "version": "4.3.3",
60
+ "version": "4.3.5",
61
61
  "description": "Various packages to assist in the development of our Custom Applications.",
62
62
  "main": "index.js",
63
63
  "scripts": {