@digital-ai/dot-components 3.15.0 → 3.15.2

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 (2) hide show
  1. package/index.esm.js +8 -2
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -10696,6 +10696,12 @@ function DotDashboardDialog({
10696
10696
  validateName(newName);
10697
10697
  }
10698
10698
  }, [validateName]);
10699
+ const validateRequiredFields = () => {
10700
+ if (!formValues.name) {
10701
+ return false;
10702
+ }
10703
+ return true;
10704
+ };
10699
10705
  return jsxs(StyledDashboardDialog, {
10700
10706
  cancelButtonProps: {
10701
10707
  'data-testid': 'cancel-create-dashboard-button'
@@ -10777,13 +10783,13 @@ function DotDashboardDialog({
10777
10783
  children: "Cancel"
10778
10784
  }), jsx(DotButton, {
10779
10785
  "data-testid": "save-edit-exit-dashboard-button",
10780
- disabled: isLoadingSubmit || !isDirty,
10786
+ disabled: isLoadingSubmit || !isDirty || !validateRequiredFields(),
10781
10787
  onClick: handleSubmitEditExit,
10782
10788
  type: "outlined",
10783
10789
  children: "Save and exit"
10784
10790
  }), jsx(DotButton, {
10785
10791
  "data-testid": "save-edit-continue-dashboard-button",
10786
- disabled: isLoadingSubmit,
10792
+ disabled: isLoadingSubmit || !validateRequiredFields(),
10787
10793
  onClick: handleSubmitEditContinue,
10788
10794
  type: "primary",
10789
10795
  children: isDirty ? 'Save and continue' : 'Continue'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "3.15.0",
3
+ "version": "3.15.2",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [