Only update selected if different from current
This commit is contained in:
parent
281c3ef4d6
commit
2bc2fb14f6
@ -64,10 +64,12 @@ export class App extends React.Component<AppProps, AppState> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateSelect(selected: string): void {
|
updateSelect(selected: string): void {
|
||||||
|
if (selected !== this.state.selectedStream) {
|
||||||
this.setState((state) => {
|
this.setState((state) => {
|
||||||
return { streamList: state.streamList, selectedStream: selected }
|
return { streamList: state.streamList, selectedStream: selected }
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user