@visns-studio/visns-components 2.3.10 → 2.3.11
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/cms/DataGrid.jsx +47 -40
- package/package.json +4 -4
|
@@ -267,51 +267,58 @@ const DataGrid = ({
|
|
|
267
267
|
setDataReload(randomNumber);
|
|
268
268
|
};
|
|
269
269
|
|
|
270
|
-
const onRowClick = useCallback(
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
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
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
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
|
-
|
|
307
|
-
|
|
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
|
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.
|
|
10
|
-
"html-react-parser": "^4.2.
|
|
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.
|
|
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.
|
|
45
|
+
"version": "2.3.11",
|
|
46
46
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
47
47
|
"main": "index.js",
|
|
48
48
|
"scripts": {
|