remove selected tags from suggestions
This commit is contained in:
parent
8d290eb927
commit
b11262ad52
1 changed files with 2 additions and 1 deletions
|
@ -60,7 +60,8 @@ export default function TagsSearch(props: Props) {
|
||||||
const selectedTagsSet = new Set(tagsPassedIn.map(tag => tag.name));
|
const selectedTagsSet = new Set(tagsPassedIn.map(tag => tag.name));
|
||||||
const unfollowedTagsSet = new Set(unfollowedTags.map(tag => tag.name));
|
const unfollowedTagsSet = new Set(unfollowedTags.map(tag => tag.name));
|
||||||
const remainingFollowedTagsSet = setDifference(followedTagsSet, selectedTagsSet);
|
const remainingFollowedTagsSet = setDifference(followedTagsSet, selectedTagsSet);
|
||||||
const suggestedTagsSet = setUnion(remainingFollowedTagsSet, unfollowedTagsSet);
|
const remainingUnfollowedTagsSet = setDifference(unfollowedTagsSet, selectedTagsSet);
|
||||||
|
const suggestedTagsSet = setUnion(remainingFollowedTagsSet, remainingUnfollowedTagsSet);
|
||||||
|
|
||||||
const countWithoutMature = selectedTagsSet.has('mature') ? selectedTagsSet.size - 1 : selectedTagsSet.size;
|
const countWithoutMature = selectedTagsSet.has('mature') ? selectedTagsSet.size - 1 : selectedTagsSet.size;
|
||||||
const maxed = Boolean(limitSelect && countWithoutMature >= limitSelect);
|
const maxed = Boolean(limitSelect && countWithoutMature >= limitSelect);
|
||||||
|
|
Loading…
Add table
Reference in a new issue