Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ export const TagStyled = styled(Tag)`
}
`;

let tagOptionsList: any[] = [];

const TagEdit = (props: TagEditPropsType) => {
const defaultTags = useContext(TagsContext);
const [tags, setTags] = useState(() => {
Expand Down Expand Up @@ -225,12 +227,12 @@ const TagEdit = (props: TagEditPropsType) => {
<CustomSelect.Option value={value} key={index}>
{value.split(",")[1] ? (
value.split(",").map((item, i) => (
<Tag color={getTagColor(item, [])} key={i} style={{ marginRight: "8px" }}>
<Tag color={getTagColor(item, tagOptionsList)} icon={getTagIcon(item, tagOptionsList)} key={i} style={{ marginRight: "8px" }}>
{item}
</Tag>
))
) : (
<Tag color={getTagColor(value, [])} key={index}>
<Tag color={getTagColor(value, tagOptionsList)} icon={getTagIcon(value, tagOptionsList)} key={index}>
{value}
</Tag>
)}
Expand All @@ -246,6 +248,7 @@ export const ColumnTagsComp = (function () {
childrenMap,
(props, dispatch) => {
const tagOptions = props.tagColors;
tagOptionsList = props.tagColors;
let value = props.changeValue ?? getBaseValue(props, dispatch);
value = typeof value === "string" && value.split(",")[1] ? value.split(",") : value;
const tags = _.isArray(value) ? value : [value];
Expand Down