@visns-studio/visns-components 3.5.9 → 3.5.10
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.
|
@@ -229,18 +229,6 @@ const GenericDynamic = ({ data, fetchData, label, setData, setting, type }) => {
|
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
231
|
|
|
232
|
-
// Utility function to slugify a string
|
|
233
|
-
const slugify = (text) => {
|
|
234
|
-
return text
|
|
235
|
-
.toString()
|
|
236
|
-
.toLowerCase()
|
|
237
|
-
.replace(/\s+/g, '-') // Replace spaces with -
|
|
238
|
-
.replace(/[^\w\-]+/g, '') // Remove all non-word chars
|
|
239
|
-
.replace(/\-\-+/g, '-') // Replace multiple - with single -
|
|
240
|
-
.replace(/^-+/, '') // Trim - from start of text
|
|
241
|
-
.replace(/-+$/, ''); // Trim - from end of text
|
|
242
|
-
};
|
|
243
|
-
|
|
244
232
|
const handleDownloadForm = async (item, key) => {
|
|
245
233
|
// Show loading toast and keep its ID
|
|
246
234
|
const toastId = toast.loading('Downloading form...');
|
|
@@ -384,6 +372,7 @@ const GenericDynamic = ({ data, fetchData, label, setData, setting, type }) => {
|
|
|
384
372
|
setActiveFormKey(data[type].length - 1);
|
|
385
373
|
}
|
|
386
374
|
} else {
|
|
375
|
+
setActiveForm([]);
|
|
387
376
|
handleAddNewForm();
|
|
388
377
|
}
|
|
389
378
|
}, [data, type]);
|
package/package.json
CHANGED