Skip to content
Snippets Groups Projects
Commit 124a1f6d authored by chris's avatar chris
Browse files

render tag list

parent 5ca1a596
No related branches found
No related tags found
1 merge request!232feat(custom-tag-block): added custom-tag-block
......@@ -87,7 +87,16 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => {
item.run(state, dispatch, val.replace(/ /g, '-'));
};
console.log(allTags);
const renderTagList = () => {
const tagList = [];
const blockTags = allTags.filter(tag => {
return tag.tagType === 'block';
});
blockTags.forEach(blockTag => {
tagList.push(<span key={uuidv4()}>{blockTag.label}</span>);
});
return <div>{tagList}</div>;
};
return useMemo(
() => (
......@@ -103,6 +112,7 @@ const CustomTagBlockComponent = ({ isShowTag, item }) => {
<Add onClick={onClickAdd}>Add</Add>
</FlexDiv>
)}
{renderTagList()}
</Wrapper>
),
[isShowTag, inputValue],
......
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