Skip to content

Commit

Permalink
fix: duplicated recipients on sharing posts
Browse files Browse the repository at this point in the history
  • Loading branch information
SunriseFox authored and Jack-Works committed Sep 18, 2019
1 parent a927e04 commit 3cd6c5c
Showing 1 changed file with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,20 @@ export function SelectPeopleAndGroupsUI<ServeType extends Group | Person = Perso
<div className={classesProp.root}>
<Box display="flex" className={classes.selectedArea}>
{frozenSelected.map(FrozenChip)}
{selected.map(item => (
<PersonOrGroupInChip
disabled={disabled}
key={item.identifier.toText()}
item={item}
onDelete={() =>
onSetSelected(selected.filter(x => !x.identifier.equals(item.identifier)) as ServeType[])
}
/>
))}
{selected
.filter(item => !frozenSelected.includes(item as ServeType))
.map(item => (
<PersonOrGroupInChip
disabled={disabled}
key={item.identifier.toText()}
item={item}
onDelete={() =>
onSetSelected(selected.filter(
x => !x.identifier.equals(item.identifier),
) as ServeType[])
}
/>
))}
<InputBase
className={classes.input}
value={disabled ? '' : search}
Expand Down

0 comments on commit 3cd6c5c

Please sign in to comment.