@bigbinary/neeto-molecules 1.0.45 → 1.0.47

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.
@@ -3397,10 +3397,6 @@ var FormRow = function FormRow(_ref) {
3397
3397
  var data = _ref.data,
3398
3398
  isAddNew = _ref.isAddNew,
3399
3399
  onCollapse = _ref.onCollapse;
3400
- var _useState = React.useState(false),
3401
- _useState2 = _slicedToArray(_useState, 2),
3402
- isSubmitted = _useState2[0],
3403
- setIsSubmitted = _useState2[1];
3404
3400
  var _useCreateAllowedIpRa = useCreateAllowedIpRanges(),
3405
3401
  createAllowedIpRange = _useCreateAllowedIpRa.mutate;
3406
3402
  var _useUpdateAllowedIpRa = useUpdateAllowedIpRanges(),
@@ -3422,49 +3418,48 @@ var FormRow = function FormRow(_ref) {
3422
3418
  "data-cy": "allowed-ip-range-form",
3423
3419
  formikProps: {
3424
3420
  initialValues: data,
3425
- validateOnBlur: isSubmitted,
3426
- validateOnChange: isSubmitted,
3427
3421
  validationSchema: getIpRestrictionValidationSchema(),
3428
3422
  onSubmit: handleSubmit
3429
3423
  }
3430
- }, /*#__PURE__*/React__default["default"].createElement("div", {
3431
- className: "neeto-ui-bg-white flex w-full flex-row justify-between px-2 py-2"
3432
- }, /*#__PURE__*/React__default["default"].createElement(formik.Input, {
3433
- autoFocus: true,
3434
- className: "w-5/12 flex-grow px-3 py-2 text-left",
3435
- "data-cy": "ip-start-text-field",
3436
- name: "ipStart",
3437
- placeholder: t("neetoMolecules.ipRestriction.ipStart")
3438
- }), /*#__PURE__*/React__default["default"].createElement(formik.Input, {
3439
- className: "w-5/12 flex-grow px-3 py-2 text-left",
3440
- "data-cy": "ip-end-text-field",
3441
- name: "ipEnd",
3442
- placeholder: t("neetoMolecules.ipRestriction.ipEnd")
3443
- }), /*#__PURE__*/React__default["default"].createElement("div", {
3444
- className: "w-5/12 flex-grow px-3 py-2 text-center"
3445
- }, /*#__PURE__*/React__default["default"].createElement(formik.Button, {
3446
- "data-cy": "save-changes-button",
3447
- icon: neetoIcons.Check,
3448
- style: "text",
3449
- tooltipProps: {
3450
- content: "Submit",
3451
- position: "top"
3452
- },
3453
- type: "submit",
3454
- onClick: function onClick() {
3455
- return setIsSubmitted(true);
3456
- }
3457
- }), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
3458
- "data-cy": "ip-cancel-button",
3459
- icon: neetoIcons.Close,
3460
- style: "text",
3461
- type: "reset",
3462
- tooltipProps: {
3463
- content: t("neetoMolecules.common.actions.cancel"),
3464
- position: "top"
3465
- },
3466
- onClick: onCollapse
3467
- }))));
3424
+ }, function (_ref2) {
3425
+ var isSubmitting = _ref2.isSubmitting;
3426
+ return /*#__PURE__*/React__default["default"].createElement("div", {
3427
+ className: "neeto-ui-bg-white flex w-full flex-row justify-between px-2 py-2"
3428
+ }, /*#__PURE__*/React__default["default"].createElement(formik.Input, {
3429
+ autoFocus: true,
3430
+ className: "w-5/12 flex-grow px-3 py-2 text-left",
3431
+ "data-cy": "ip-start-text-field",
3432
+ name: "ipStart",
3433
+ placeholder: t("neetoMolecules.ipRestriction.ipStart")
3434
+ }), /*#__PURE__*/React__default["default"].createElement(formik.Input, {
3435
+ className: "w-5/12 flex-grow px-3 py-2 text-left",
3436
+ "data-cy": "ip-end-text-field",
3437
+ name: "ipEnd",
3438
+ placeholder: t("neetoMolecules.ipRestriction.ipEnd")
3439
+ }), /*#__PURE__*/React__default["default"].createElement("div", {
3440
+ className: "w-5/12 flex-grow px-3 py-2 text-center"
3441
+ }, /*#__PURE__*/React__default["default"].createElement(formik.Button, {
3442
+ "data-cy": "save-changes-button",
3443
+ disabled: isSubmitting,
3444
+ icon: neetoIcons.Check,
3445
+ style: "text",
3446
+ tooltipProps: {
3447
+ content: "Submit",
3448
+ position: "top"
3449
+ },
3450
+ type: "submit"
3451
+ }), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
3452
+ "data-cy": "ip-cancel-button",
3453
+ icon: neetoIcons.Close,
3454
+ style: "text",
3455
+ type: "reset",
3456
+ tooltipProps: {
3457
+ content: t("neetoMolecules.common.actions.cancel"),
3458
+ position: "top"
3459
+ },
3460
+ onClick: onCollapse
3461
+ })));
3462
+ });
3468
3463
  };
3469
3464
 
3470
3465
  var Row = function Row(_ref) {