only select new channels in selector if they aren't currently selected
This commit is contained in:
parent
9b5860c1bf
commit
6af22e7caf
1 changed files with 8 additions and 1 deletions
|
@ -46,7 +46,14 @@ function ChannelSelector(props: Props) {
|
|||
<MenuList className="menu__list">
|
||||
{channels &&
|
||||
channels.map(channel => (
|
||||
<MenuItem key={channel.canonical_url} onSelect={() => onChannelSelect(channel.canonical_url)}>
|
||||
<MenuItem
|
||||
key={channel.canonical_url}
|
||||
onSelect={() => {
|
||||
if (selectedChannelUrl !== channel.canonical_url) {
|
||||
onChannelSelect(channel.canonical_url);
|
||||
}
|
||||
}}
|
||||
>
|
||||
<ChannelListItem uri={channel.canonical_url} />
|
||||
</MenuItem>
|
||||
))}
|
||||
|
|
Loading…
Add table
Reference in a new issue