Open
Description
I am trying to set the user's focused channel from a URL parameter once the page loads, and after the client has initialized. I get this channel URL and try to set the customActiveChannel value but it doesn't seem to update if it's a stateful value that starts undefined
.
To Reproduce
Steps to reproduce the behavior:
- Create a stateful value:
const [activeChannel, setActiveChannel] = useState<string | undefined>(undefined)
- Call
setActiveChannel
after the initial load and once MessageList has already received a prop ofcustomActiveChannel = undefined
- After the value has been changed and the component is rendered, the MessageList won't have the channel selected and nothing has changed.
Expected behavior
The ChannelList should focus the channel with the id of customActiveChannel
prop if it has changed.
Package version
- stream-chat-react: 12.10.0
- stream-chat-css:
- stream-chat-js: 8.55
Desktop:
- OS: macOS Silicon
- Browser Chrome
- Version 133