@linzjs/lui 16.4.0 → 16.5.0

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ # [16.5.0](https://github.com/linz/lui/compare/v16.4.0...v16.5.0) (2022-05-02)
2
+
3
+
4
+ ### Features
5
+
6
+ * **LuiBearingFormikInput:** Add preferValidationError prop ([#660](https://github.com/linz/lui/issues/660)) ([657dc23](https://github.com/linz/lui/commit/657dc23807aca7a2cd7e1c1d6e3788b40de1af08))
7
+
1
8
  # [16.4.0](https://github.com/linz/lui/compare/v16.3.0...v16.4.0) (2022-05-02)
2
9
 
3
10
 
@@ -16,6 +16,8 @@ export declare const LuiBearingInput: React.FC<LuiBearingInputProps & LuiCommonI
16
16
  interface LuiBearingFormikInputProps {
17
17
  name: string;
18
18
  label: string;
19
+ /** If true, validationError prop takes precedence over the LuiBearingInput internalError value. */
20
+ preferValidationError?: boolean;
19
21
  }
20
22
  export declare const LuiBearingFormikInput: React.FC<LuiBearingFormikInputProps & LuiCommonInputProps>;
21
23
  export {};
package/dist/index.js CHANGED
@@ -1373,7 +1373,7 @@ var LuiBearingFormikInput = function (props) {
1373
1373
  }
1374
1374
  return (React__default["default"].createElement(React__default["default"].Fragment, null,
1375
1375
  React__default["default"].createElement(formik.Field, { name: props.name, validate: validateBearing }, function (renderProps) {
1376
- return (React__default["default"].createElement(LuiBearingInput, __assign({ name: props.name }, renderProps.field, { validationError: formik.getIn(ctx === null || ctx === void 0 ? void 0 : ctx.errors, props.name), required: true, onValidate: onValidate, inputProps: props.inputProps })));
1376
+ return (React__default["default"].createElement(LuiBearingInput, __assign({ name: props.name }, renderProps.field, { validationError: formik.getIn(ctx === null || ctx === void 0 ? void 0 : ctx.errors, props.name), required: true, onValidate: onValidate, inputProps: props.inputProps, preferValidationError: props.preferValidationError })));
1377
1377
  })));
1378
1378
  };
1379
1379