@onehat/ui 0.3.266 → 0.3.268
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/package.json
CHANGED
|
@@ -409,6 +409,11 @@ export default function withSecondaryEditor(WrappedComponent, isTree = false) {
|
|
|
409
409
|
secondarySetIsEditorShown(false);
|
|
410
410
|
}
|
|
411
411
|
const formState = secondaryEditorStateRef.current;
|
|
412
|
+
if (!formState) {
|
|
413
|
+
setIsAdding(false);
|
|
414
|
+
secondarySetIsEditorShown(false);
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
412
417
|
if (!_.isEmpty(formState.dirtyFields)) {
|
|
413
418
|
confirm('This record has unsaved changes. Are you sure you want to cancel editing? Changes will be lost.', doIt);
|
|
414
419
|
} else {
|
|
@@ -408,6 +408,11 @@ export default function withEditor(WrappedComponent, isTree = false) {
|
|
|
408
408
|
setIsEditorShown(false);
|
|
409
409
|
}
|
|
410
410
|
const formState = editorStateRef.current;
|
|
411
|
+
if (!formState) {
|
|
412
|
+
setIsAdding(false);
|
|
413
|
+
setIsEditorShown(false);
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
411
416
|
if (!_.isEmpty(formState.dirtyFields)) {
|
|
412
417
|
confirm('This record has unsaved changes. Are you sure you want to cancel editing? Changes will be lost.', doIt);
|
|
413
418
|
} else {
|
|
@@ -53,7 +53,9 @@ export default function withPdfButton(WrappedComponent) {
|
|
|
53
53
|
items = [];
|
|
54
54
|
_.each(ancillaryItemsClone, (ancillaryItem) => { // clone, as we don't want to alter the item by reference
|
|
55
55
|
let name;
|
|
56
|
-
if (ancillaryItem.
|
|
56
|
+
if (ancillaryItem.pdfModel) {
|
|
57
|
+
name = ancillaryItem.pdfModel;
|
|
58
|
+
} else if (ancillaryItem.model) {
|
|
57
59
|
name = Inflector.underscore(ancillaryItem.model);
|
|
58
60
|
} else {
|
|
59
61
|
name = ancillaryItem.title;
|