@visns-studio/visns-components 2.3.10 → 2.3.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.
@@ -267,51 +267,58 @@ const DataGrid = ({
267
267
  setDataReload(randomNumber);
268
268
  };
269
269
 
270
- const onRowClick = useCallback((rowProps, event) => {
271
- const cellElement = event.target.closest('.InovuaReactDataGrid__cell');
272
- const columnIndex = Array.from(cellElement.parentNode.children).indexOf(
273
- cellElement
274
- );
275
-
276
- let proceed = true;
277
-
278
- columns.forEach((a, b) => {
279
- if (
280
- a.id === rowProps.columns[columnIndex].id &&
281
- a.type === 'toggle'
282
- ) {
283
- proceed = false;
284
- }
285
- });
270
+ const onRowClick = useCallback(
271
+ (rowProps, event) => {
272
+ const cellElement = event.target.closest(
273
+ '.InovuaReactDataGrid__cell'
274
+ );
275
+ const columnIndex = Array.from(
276
+ cellElement.parentNode.children
277
+ ).indexOf(cellElement);
278
+
279
+ let proceed = true;
280
+
281
+ columns.forEach((a, b) => {
282
+ if (
283
+ a.id === rowProps.columns[columnIndex].id &&
284
+ a.type === 'toggle'
285
+ ) {
286
+ proceed = false;
287
+ }
288
+ });
286
289
 
287
- if (proceed) {
288
- if (
289
- rowProps.columns[columnIndex].link &&
290
- rowProps.columns[columnIndex].link.url
291
- ) {
292
- if (rowProps.columns[columnIndex].link.folder) {
293
- window.location.href =
294
- rowProps.columns[columnIndex].link.url +
295
- rowProps.data[rowProps.columns[columnIndex].link.key] +
296
- '/' +
297
- rowProps.columns[columnIndex].link.folder;
298
- } else {
299
- navigate(
300
- `${rowProps.columns[columnIndex].link.url}${
290
+ if (proceed) {
291
+ if (
292
+ rowProps.columns[columnIndex].link &&
293
+ rowProps.columns[columnIndex].link.url
294
+ ) {
295
+ if (rowProps.columns[columnIndex].link.folder) {
296
+ window.location.href =
297
+ rowProps.columns[columnIndex].link.url +
301
298
  rowProps.data[
302
299
  rowProps.columns[columnIndex].link.key
303
- ]
304
- }`,
305
- {
306
- state: {
307
- form: form,
308
- },
309
- }
310
- );
300
+ ] +
301
+ '/' +
302
+ rowProps.columns[columnIndex].link.folder;
303
+ } else {
304
+ navigate(
305
+ `${rowProps.columns[columnIndex].link.url}${
306
+ rowProps.data[
307
+ rowProps.columns[columnIndex].link.key
308
+ ]
309
+ }`,
310
+ {
311
+ state: {
312
+ form: form,
313
+ },
314
+ }
315
+ );
316
+ }
311
317
  }
312
318
  }
313
- }
314
- }, []);
319
+ },
320
+ [form]
321
+ );
315
322
 
316
323
  const onRenderRow = useCallback((rowProps) => {
317
324
  // save the original handlers to be called later
@@ -1381,7 +1388,7 @@ const DataGrid = ({
1381
1388
 
1382
1389
  navigate(_url + '/create', {
1383
1390
  state: {
1384
- form: form,
1391
+ form: formData,
1385
1392
  },
1386
1393
  });
1387
1394
  }}
package/package.json CHANGED
@@ -6,8 +6,8 @@
6
6
  "array-move": "^4.0.0",
7
7
  "awesome-debounce-promise": "^2.1.0",
8
8
  "axios": "^1.4.0",
9
- "framer-motion": "^10.15.1",
10
- "html-react-parser": "^4.2.0",
9
+ "framer-motion": "^10.15.2",
10
+ "html-react-parser": "^4.2.1",
11
11
  "lodash": "^4.17.21",
12
12
  "moment": "^2.29.4",
13
13
  "motion": "^10.16.2",
@@ -17,7 +17,7 @@
17
17
  "react-confirm-alert": "^3.0.6",
18
18
  "react-datepicker": "^4.16.0",
19
19
  "react-dropzone": "^14.2.3",
20
- "react-number-format": "^5.2.2",
20
+ "react-number-format": "^5.3.0",
21
21
  "react-password-strength-bar": "^0.4.1",
22
22
  "react-promise-tracker": "^2.1.1",
23
23
  "react-quill": "^2.0.0",
@@ -42,7 +42,7 @@
42
42
  "react-dom": "^17.0.1"
43
43
  },
44
44
  "name": "@visns-studio/visns-components",
45
- "version": "2.3.10",
45
+ "version": "2.3.12",
46
46
  "description": "Various packages to assist in the development of our Custom Applications.",
47
47
  "main": "index.js",
48
48
  "scripts": {