Skip to content

Commit

Permalink
Add debugging output to resolve issue with import callback
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie-n committed Jun 19, 2024
1 parent 46189ac commit af8aee7
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dist/components/form/components/FormRichText.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions dist/components/form/components/FormRichText.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/components/form/components/FormRichText.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.es.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25550,8 +25550,10 @@ var FormRichText = function (_a) {
};
React.useEffect(function () {
if (containerRef.current) {
console.log(importCallback);
if (importCallback) {
//Callback to import new modules into quill, needs to be done within the same instance as the quill object.
console.log("import callback called");
// Callback to import new modules into quill, needs to be done within the same instance as the quill object.
importCallback();
}
var container_1 = containerRef.current;
Expand All @@ -25570,7 +25572,7 @@ var FormRichText = function (_a) {
// NOTE: Run effect once on component mount, please recheck dependencies if effect is updated.
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return React.createElement("div", { ref: containerRef, style: rest.style, id: rest.id, className: rest.className });
return (React.createElement("div", { ref: containerRef, style: rest.style, id: rest.id, className: rest.className }));
};

var FormDateTime = function (_a) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/components/form/components/FormRichText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ const FormRichText = ({

useEffect(() => {
if (containerRef.current) {
console.log(importCallback);
if (importCallback) {
console.log('import callback called');
// Callback to import new modules into quill, needs to be done within the same instance as the quill object.
importCallback();
}
Expand Down

0 comments on commit af8aee7

Please sign in to comment.