@bigbinary/neeto-form-frontend 2.0.6 → 2.0.7

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/dist/index.cjs.js CHANGED
@@ -28630,18 +28630,18 @@ function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t
28630
28630
  var RichTextEditor = function RichTextEditor(_ref) {
28631
28631
  var editorRef = _ref.editorRef,
28632
28632
  question = _ref.question,
28633
- preview = _ref.preview,
28634
28633
  _ref$editorProps = _ref.editorProps,
28635
28634
  editorProps = _ref$editorProps === void 0 ? {} : _ref$editorProps;
28636
28635
  var _useFormikContext = formik.useFormikContext(),
28637
- errors = _useFormikContext.errors;
28636
+ errors = _useFormikContext.errors,
28637
+ touched = _useFormikContext.touched;
28638
28638
  var name = question.id,
28639
28639
  kind = question.kind,
28640
28640
  isRequired = question.isRequired,
28641
28641
  nodeId = question.nodeId;
28642
28642
  var label = fieldWithFallback(question, "label");
28643
28643
  var debouncedPlaceholder = reactUtils.useDebounce(fieldWithFallback(question, "placeholder"), 300);
28644
- var propsToCompare = preview ? ["debouncedPlaceholder", "error"] : ["debouncedPlaceholder"];
28644
+ var propsToCompare = ["debouncedPlaceholder", "error", "touched"];
28645
28645
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
28646
28646
  className: "neeto-form-engine-input__wrapper",
28647
28647
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
@@ -28655,6 +28655,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
28655
28655
  error: errors[name],
28656
28656
  name: name || nodeId,
28657
28657
  shouldUpdate: isPropsUnequal(propsToCompare),
28658
+ touched: touched[name],
28658
28659
  validate: validateFieldValue({
28659
28660
  kind: kind,
28660
28661
  label: label,