From 71db5f93c1e90f3b3e129338359f45d14fa20306 Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Wed, 21 Apr 2021 13:19:09 +0300
Subject: [PATCH] fix custom tags

---
 .../src/components/customtag/CustomTagBlockComponent.js       | 4 ++--
 .../components/customtag/CustomTagInlineOverlayCompoment.js   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/wax-prosemirror-components/src/components/customtag/CustomTagBlockComponent.js b/wax-prosemirror-components/src/components/customtag/CustomTagBlockComponent.js
index 14d71e231..ecdb3778f 100644
--- a/wax-prosemirror-components/src/components/customtag/CustomTagBlockComponent.js
+++ b/wax-prosemirror-components/src/components/customtag/CustomTagBlockComponent.js
@@ -121,7 +121,7 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => {
     if (inputValue.trim() === '') return;
     configTags.push({ label: inputValue, tagType: 'block' });
     setAllTags(configTags);
-    saveTags(configTags);
+    saveTags({ label: inputValue, tagType: 'block' });
     setInputValue('');
     if (ref.current) ref.current.focus();
   };
@@ -178,7 +178,7 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => {
         {renderTagList()}
       </>
     ),
-    [isShowTag, inputValue, tagStatus, isDisabled],
+    [isShowTag, inputValue, JSON.stringify(tagStatus), isDisabled],
   );
 };
 
diff --git a/wax-prosemirror-components/src/components/customtag/CustomTagInlineOverlayCompoment.js b/wax-prosemirror-components/src/components/customtag/CustomTagInlineOverlayCompoment.js
index 00187f37e..aae723d72 100644
--- a/wax-prosemirror-components/src/components/customtag/CustomTagInlineOverlayCompoment.js
+++ b/wax-prosemirror-components/src/components/customtag/CustomTagInlineOverlayCompoment.js
@@ -132,7 +132,7 @@ const CustomTagInlineOverlayComponent = ({ mark, setPosition, position }) => {
 
     configTags.push({ label: inputValue, tagType: 'inline' });
     setAllTags(configTags);
-    saveTags(configTags);
+    saveTags({ label: inputValue, tagType: 'inline' });
     setInputValue('');
     if (ref.current) ref.current.focus();
     setInputValue('');
-- 
GitLab