Created
June 4, 2021 18:37
-
-
Save michael-mckenna/cde3fe5383307ae39461804c2fcb61ef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Updatess the corresponding channel's name. Triggers change detection by returning a new array. | |
* @param channel channel with updated name | |
*/ | |
updateChannel(channel: Channel) { | |
this.channels = this.channels.map(c => c.id === channel.id ? {...c, name: channel.name} : {...c}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment