@visns-studio/visns-components 1.7.5 → 1.7.7
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.
|
@@ -327,35 +327,33 @@ const DataGrid = forwardRef(
|
|
|
327
327
|
).indexOf(cellElement);
|
|
328
328
|
|
|
329
329
|
if (columnIndex === rowProps.columns.length - 1) {
|
|
330
|
+
// Handle last column click
|
|
330
331
|
} else {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
"/" +
|
|
332
|
+
const column = rowProps.columns[columnIndex];
|
|
333
|
+
|
|
334
|
+
if (column.link && column.link.url) {
|
|
335
|
+
const fileRelationArray = column.id.split(".");
|
|
336
|
+
const linkUrl = column.link.url;
|
|
337
|
+
const linkKey = rowProps.columns[columnIndex].link.key;
|
|
338
|
+
const rowData = rowProps.data[linkKey];
|
|
339
|
+
|
|
340
|
+
if (column.link.folder) {
|
|
341
|
+
const linkFolder =
|
|
342
342
|
rowProps.columns[columnIndex].link.folder;
|
|
343
|
+
|
|
344
|
+
if (rowProps.data[fileRelationArray[0]]) {
|
|
345
|
+
window.location.href = `${linkUrl}${rowData}/${linkFolder}`;
|
|
346
|
+
}
|
|
343
347
|
} else {
|
|
344
|
-
navigate(
|
|
345
|
-
`${rowProps.columns[columnIndex].link.url}${
|
|
346
|
-
rowProps.data[
|
|
347
|
-
rowProps.columns[columnIndex].link.key
|
|
348
|
-
]
|
|
349
|
-
}`
|
|
350
|
-
);
|
|
348
|
+
navigate(`${linkUrl}${rowData}`);
|
|
351
349
|
}
|
|
352
|
-
} else if (
|
|
350
|
+
} else if (column.link && column.link.popup) {
|
|
351
|
+
const linkPopup = column.link.popup;
|
|
352
|
+
const linkKey = rowProps.columns[columnIndex].link.key;
|
|
353
|
+
const rowData = rowProps.data[linkKey];
|
|
354
|
+
|
|
353
355
|
window.open(
|
|
354
|
-
`${
|
|
355
|
-
rowProps.data[
|
|
356
|
-
rowProps.columns[columnIndex].link.key
|
|
357
|
-
]
|
|
358
|
-
}`,
|
|
356
|
+
`${linkPopup}/${rowData}`,
|
|
359
357
|
"",
|
|
360
358
|
"width=1440,height=1024,menubar=1,resizable=1,status=1,titlebar=1,toolbar=1"
|
|
361
359
|
);
|
|
@@ -388,7 +386,11 @@ const DataGrid = forwardRef(
|
|
|
388
386
|
className="btn"
|
|
389
387
|
onClick={() => {
|
|
390
388
|
if (form.create) {
|
|
391
|
-
|
|
389
|
+
if (form.create.url) {
|
|
390
|
+
navigate(form.create.url);
|
|
391
|
+
} else {
|
|
392
|
+
modalOpen("create", 0);
|
|
393
|
+
}
|
|
392
394
|
} else {
|
|
393
395
|
if (form.url) {
|
|
394
396
|
window.open(
|
|
@@ -449,7 +449,17 @@ function Form(props) {
|
|
|
449
449
|
});
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
-
|
|
452
|
+
console.info(
|
|
453
|
+
fileUpload,
|
|
454
|
+
formData[fileKey],
|
|
455
|
+
formData[fileKey] instanceof File
|
|
456
|
+
);
|
|
457
|
+
|
|
458
|
+
if (
|
|
459
|
+
fileUpload === true &&
|
|
460
|
+
formData[fileKey] !== null &&
|
|
461
|
+
formData[fileKey] instanceof File
|
|
462
|
+
) {
|
|
453
463
|
Vapor.store(formData[fileKey], {
|
|
454
464
|
progress: (progress) => {
|
|
455
465
|
setUploadProgress(progress * 100);
|
package/package.json
CHANGED