I’m trying to find a way to automatically set the initial channel when loading the page (use case is so that we can link directly to certain channels). I’m using the Channel and ChannelList components, with a stateful currentChannelUrl variable - it’s pretty much all the same as the sample app.
I can pass a channel URL and update the currentChannelUrl variable, but I’m finding that the ChanneList automatically triggers onChannelSelect (sometimes multiple times) with the top channel in the list. So even if I set it to an initial value, something is automatically resetting it to the top value when the channel list loads. I haven’t found a way around this without hacky ideas like ignoring the onChannelSelect call for the first X times. It seems to be triggered twice, but I don’t know why or if it that’s consistent
Any thoughts? Is there a way to prevent it from automatically triggering on its own when loading the component?
I’m using the react UI Kit version 2.2.1.