dattatable 2.2.3 → 2.2.5

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.
Files changed (38) hide show
  1. package/build/itemForm.js +13 -9
  2. package/dist/dattatable.js +433 -433
  3. package/dist/dattatable.min.js +1 -1
  4. package/docs/classes/CanvasForm.html +17 -17
  5. package/docs/classes/Comments.html +12 -12
  6. package/docs/classes/Dashboard.html +15 -15
  7. package/docs/classes/DataTable.html +11 -11
  8. package/docs/classes/Documents.html +45 -45
  9. package/docs/classes/FilterSlideout.html +14 -14
  10. package/docs/classes/Footer.html +4 -4
  11. package/docs/classes/Header.html +4 -4
  12. package/docs/classes/InstallationRequired.html +12 -12
  13. package/docs/classes/ItemForm.html +47 -47
  14. package/docs/classes/LoadingDialog.html +12 -12
  15. package/docs/classes/Modal.html +26 -26
  16. package/docs/classes/Navigation.html +4 -4
  17. package/docs/enums/ActionButtonTypes.html +6 -6
  18. package/docs/functions/formatBytes.html +1 -1
  19. package/docs/functions/formatDateValue.html +1 -1
  20. package/docs/functions/formatTimeValue.html +1 -1
  21. package/docs/functions/getFileExt.html +1 -1
  22. package/docs/interfaces/ICommentsItem.html +6 -6
  23. package/docs/interfaces/IDashboardProps.html +14 -14
  24. package/docs/interfaces/IDataTable.html +7 -7
  25. package/docs/interfaces/IDataTableProps.html +6 -6
  26. package/docs/interfaces/IDocumentsProps.html +25 -25
  27. package/docs/interfaces/IFilterItem.html +5 -5
  28. package/docs/interfaces/IFilterProps.html +4 -4
  29. package/docs/interfaces/IFooterProps.html +6 -6
  30. package/docs/interfaces/IHeaderProps.html +5 -5
  31. package/docs/interfaces/IItemFormCreateProps.html +14 -14
  32. package/docs/interfaces/IItemFormEditProps.html +15 -15
  33. package/docs/interfaces/IItemFormTab.html +7 -7
  34. package/docs/interfaces/IItemFormTabInfo.html +3 -3
  35. package/docs/interfaces/IItemFormViewProps.html +12 -12
  36. package/docs/interfaces/IShowDialogProps.html +5 -5
  37. package/package.json +2 -2
  38. package/pnpm-lock.yaml +7 -7
package/build/itemForm.js CHANGED
@@ -427,16 +427,20 @@ var ItemForm = /** @class */ (function () {
427
427
  common_1.LoadingDialog.setBody((_this.IsNew ? "Creating" : "Updating") + " the Item");
428
428
  // Saves the item
429
429
  var saveItem_1 = function (values) {
430
- // Save the item
431
- forms[0].save(values).then(function (item) {
432
- // Call the update event
433
- _this._updateEvent ? _this._updateEvent(item) : null;
434
- // Close the dialogs
435
- (_this._useModal ? common_1.Modal : common_1.CanvasForm).hide();
436
- common_1.LoadingDialog.hide();
437
- });
430
+ // If values is null then do nothing. This would happen when the
431
+ // onSave event wants to cancel the save and do something custom
432
+ if (values) {
433
+ // Save the item
434
+ forms[0].save(values).then(function (item) {
435
+ // Call the update event
436
+ _this._updateEvent ? _this._updateEvent(item) : null;
437
+ // Close the dialogs
438
+ (_this._useModal ? common_1.Modal : common_1.CanvasForm).hide();
439
+ common_1.LoadingDialog.hide();
440
+ });
441
+ }
438
442
  };
439
- // Call the save event
443
+ // Call the save event and ensure values exist
440
444
  values = _this._onSave ? _this._onSave(values) : values;
441
445
  // See if the onSave event returned a promise
442
446
  if (values && typeof (values["then"]) === "function") {