tp-react-elements-dev 1.7.1 → 1.7.2

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
@@ -52369,6 +52369,7 @@ var JoditEditor = /*@__PURE__*/getDefaultExportFromCjs(joditReactExports);
52369
52369
  const RichTextEditor = ({ props }) => {
52370
52370
  const editor = React$1.useRef(null);
52371
52371
  const [content, setContent] = React$1.useState("");
52372
+ const value = props.getValues(props.item.name);
52372
52373
  const config = Object.assign({ readonly: false, placeholder: "Start typing...", removeButtons: props.item.removeButtons, style: {
52373
52374
  'font-family': 'Arial', // Default font is Arial
52374
52375
  }, controls: {
@@ -52395,6 +52396,9 @@ const RichTextEditor = ({ props }) => {
52395
52396
  }
52396
52397
  props.item.onBlurFn && props.item.onBlurFn(newContent);
52397
52398
  };
52399
+ React$1.useEffect(() => {
52400
+ setContent(value);
52401
+ }, [value]);
52398
52402
  const handleChange = (newContent) => {
52399
52403
  console.log(newContent, 'newContent Editor');
52400
52404
  };