@visns-studio/visns-components 3.3.8 → 3.3.9

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.
@@ -195,9 +195,9 @@ const DataGrid = forwardRef(
195
195
  }));
196
196
 
197
197
  const handleDownload = async (d) => {
198
- try {
199
- toast.success('Starting download please wait...');
198
+ const toastId = toast.loading('Starting download please wait...');
200
199
 
200
+ try {
201
201
  const res = await Download(
202
202
  `/ajax/files/download/${d.id}/null`,
203
203
  'GET',
@@ -218,6 +218,9 @@ const DataGrid = forwardRef(
218
218
  }
219
219
  } catch (error) {
220
220
  console.info(error);
221
+ } finally {
222
+ // Dismiss the loading toast in the finally block to ensure it's always dismissed
223
+ toast.dismiss(toastId);
221
224
  }
222
225
  };
223
226
 
package/package.json CHANGED
@@ -49,7 +49,7 @@
49
49
  "react-dom": "^17.0.1"
50
50
  },
51
51
  "name": "@visns-studio/visns-components",
52
- "version": "3.3.8",
52
+ "version": "3.3.9",
53
53
  "description": "Various packages to assist in the development of our Custom Applications.",
54
54
  "main": "index.js",
55
55
  "scripts": {