@centreon/ui 25.5.3 → 25.5.4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centreon/ui",
3
- "version": "25.5.3",
3
+ "version": "25.5.4",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "update:deps": "pnpx npm-check-updates -i --format group",
@@ -13,6 +13,7 @@ export type FormActionsProps = {
13
13
  onCancel: () => void;
14
14
  variant: FormVariant;
15
15
  isCancelButtonVisible?: boolean;
16
+ disableSubmit?: boolean;
16
17
  };
17
18
 
18
19
  export type FormActionsLabels = {
@@ -25,14 +26,18 @@ const FormActions = <TResource extends object>({
25
26
  onCancel,
26
27
  variant,
27
28
  enableSubmitWhenNotDirty,
28
- isCancelButtonVisible = true
29
+ isCancelButtonVisible = true,
30
+ disableSubmit = false
29
31
  }: FormActionsProps): ReactElement => {
30
32
  const { classes } = useStyles();
31
33
  const { isSubmitting, dirty, isValid, submitForm } =
32
34
  useFormikContext<TResource>();
33
35
 
34
36
  const isSubmitDisabled =
35
- isSubmitting || (!dirty && !enableSubmitWhenNotDirty) || !isValid;
37
+ disableSubmit ||
38
+ isSubmitting ||
39
+ (!dirty && !enableSubmitWhenNotDirty) ||
40
+ !isValid;
36
41
 
37
42
  return (
38
43
  <div className={classes.actions}>