Skip to content
Snippets Groups Projects
Commit 71db5f93 authored by chris's avatar chris
Browse files

fix custom tags

parent b5ef1f75
No related branches found
No related tags found
1 merge request!283fix custom tags
...@@ -121,7 +121,7 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => { ...@@ -121,7 +121,7 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => {
if (inputValue.trim() === '') return; if (inputValue.trim() === '') return;
configTags.push({ label: inputValue, tagType: 'block' }); configTags.push({ label: inputValue, tagType: 'block' });
setAllTags(configTags); setAllTags(configTags);
saveTags(configTags); saveTags({ label: inputValue, tagType: 'block' });
setInputValue(''); setInputValue('');
if (ref.current) ref.current.focus(); if (ref.current) ref.current.focus();
}; };
...@@ -178,7 +178,7 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => { ...@@ -178,7 +178,7 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => {
{renderTagList()} {renderTagList()}
</> </>
), ),
[isShowTag, inputValue, tagStatus, isDisabled], [isShowTag, inputValue, JSON.stringify(tagStatus), isDisabled],
); );
}; };
......
...@@ -132,7 +132,7 @@ const CustomTagInlineOverlayComponent = ({ mark, setPosition, position }) => { ...@@ -132,7 +132,7 @@ const CustomTagInlineOverlayComponent = ({ mark, setPosition, position }) => {
configTags.push({ label: inputValue, tagType: 'inline' }); configTags.push({ label: inputValue, tagType: 'inline' });
setAllTags(configTags); setAllTags(configTags);
saveTags(configTags); saveTags({ label: inputValue, tagType: 'inline' });
setInputValue(''); setInputValue('');
if (ref.current) ref.current.focus(); if (ref.current) ref.current.focus();
setInputValue(''); setInputValue('');
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment