@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.js CHANGED
@@ -28567,18 +28567,18 @@ function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t
28567
28567
  var RichTextEditor = function RichTextEditor(_ref) {
28568
28568
  var editorRef = _ref.editorRef,
28569
28569
  question = _ref.question,
28570
- preview = _ref.preview,
28571
28570
  _ref$editorProps = _ref.editorProps,
28572
28571
  editorProps = _ref$editorProps === void 0 ? {} : _ref$editorProps;
28573
28572
  var _useFormikContext = useFormikContext(),
28574
- errors = _useFormikContext.errors;
28573
+ errors = _useFormikContext.errors,
28574
+ touched = _useFormikContext.touched;
28575
28575
  var name = question.id,
28576
28576
  kind = question.kind,
28577
28577
  isRequired = question.isRequired,
28578
28578
  nodeId = question.nodeId;
28579
28579
  var label = fieldWithFallback(question, "label");
28580
28580
  var debouncedPlaceholder = useDebounce(fieldWithFallback(question, "placeholder"), 300);
28581
- var propsToCompare = preview ? ["debouncedPlaceholder", "error"] : ["debouncedPlaceholder"];
28581
+ var propsToCompare = ["debouncedPlaceholder", "error", "touched"];
28582
28582
  return /*#__PURE__*/jsxs("div", {
28583
28583
  className: "neeto-form-engine-input__wrapper",
28584
28584
  children: [/*#__PURE__*/jsx("div", {
@@ -28592,6 +28592,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
28592
28592
  error: errors[name],
28593
28593
  name: name || nodeId,
28594
28594
  shouldUpdate: isPropsUnequal(propsToCompare),
28595
+ touched: touched[name],
28595
28596
  validate: validateFieldValue({
28596
28597
  kind: kind,
28597
28598
  label: label,