# Programmatically set channel in Channel List (v3 beta.2)

**URL:** <https://community.sendbird.com/t/programmatically-set-channel-in-channel-list-v3-beta-2/4671>\
**Category:** React\
**Created:** [May 16, 2022, 9:35pm UTC](https://community.sendbird.com/t/programmatically-set-channel-in-channel-list-v3-beta-2/4671 "2022-05-16T21:35:36Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonsayscode](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@simonsayscode](https://community.sendbird.com/u/simonsayscode)\
**Post date:** [May 16, 2022, 9:35pm UTC](https://community.sendbird.com/t/programmatically-set-channel-in-channel-list-v3-beta-2/4671/1 "2022-05-16T21:35:36Z")

</div>

Currently using v3 beta.2 UI Kit.

Is there a way to programmatically set the channel that’s highlighted in the Channel List?

I had thought that assigning the `channelUrl` to a variable in the ChannelList component would change it but I’m not seeing any action.

It looks like internally the Channel List is using this dispatch action on user click of a channel from the list ([sendbird-uikit-react/reducers.js at develop-v3 · sendbird/sendbird-uikit-react · GitHub](https://github.com/sendbird/sendbird-uikit-react/blob/develop-v3/src/smart-components/ChannelList/dux/reducers.js#L170)) but I don’t see a clean way to do the same in my code.

---

<div class="post-metadata">

**Author:** ![Alex\_Maldonado](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/alex_maldonado/32/2019_2.png) [@Alex\_Maldonado](https://community.sendbird.com/u/Alex_Maldonado)\
**Post date:** [December 8, 2022, 10:13pm UTC](https://community.sendbird.com/t/programmatically-set-channel-in-channel-list-v3-beta-2/4671/2 "2022-12-08T22:13:18Z")

</div>

I have also encountered this same issue. We have a custom api that we call to create channels and would like to programmatically set that particular channel to be selected once the request is completed. Is there any word on this @Yongjun_Choi ?

The ability to pass in a channelUrl into the channelList component would be helpful.

---

<div class="post-metadata">

**Author:** ![Yongjun\_Choi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/yongjun_choi/32/36_2.png) [@Yongjun\_Choi](https://community.sendbird.com/u/Yongjun_Choi)\
**Post date:** [December 9, 2022, 7:15am UTC](https://community.sendbird.com/t/programmatically-set-channel-in-channel-list-v3-beta-2/4671/3 "2022-12-09T07:15:13Z")

</div>

@Alex_Maldonado Hi  
It is possible to disable the selection of the first channel automatically, but I checked with the engineer in charge that the method of setting the channel through prop is not currently available.

---

<div class="post-metadata">

**Author:** ![Alex\_Maldonado](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/alex_maldonado/32/2019_2.png) [@Alex\_Maldonado](https://community.sendbird.com/u/Alex_Maldonado)\
**Post date:** [December 9, 2022, 8:49am UTC](https://community.sendbird.com/t/programmatically-set-channel-in-channel-list-v3-beta-2/4671/4 "2022-12-09T08:49:23Z")

</div>

@Yongjun_Choi Okay thanks for all your help recently. Greatly appreciated! We will try some workaround solutions for the time being.

---

<div class="post-metadata">

**Author:** ![scott-korin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/scott-korin/32/3251_2.png) [@scott-korin](https://community.sendbird.com/u/scott-korin)\
**Post date:** [January 5, 2023, 4:13pm UTC](https://community.sendbird.com/t/programmatically-set-channel-in-channel-list-v3-beta-2/4671/5 "2023-01-05T16:13:40Z")

</div>

I was just coming here to ask this same question. We wanted to programmatically set the selected channel to `null` (so, “unset the selected channel”) We were hoping we could do this by getting to the `channelListDispatcher` through `useChannelListContext()` but it’s not available

---

<div class="post-metadata">

**Author:** ![Jawakar\_Durai](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/jawakar_durai/32/3289_2.png) [@Jawakar\_Durai](https://community.sendbird.com/u/Jawakar_Durai)\
**Post date:** [January 8, 2023, 7:49pm UTC](https://community.sendbird.com/t/programmatically-set-channel-in-channel-list-v3-beta-2/4671/6 "2023-01-08T19:49:15Z")

</div>

We need this too, any idea of providing such API? Or workarounds?

---

<div class="post-metadata">

**Author:** ![scott-korin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/scott-korin/32/3251_2.png) [@scott-korin](https://community.sendbird.com/u/scott-korin)\
**Post date:** [January 20, 2023, 3:57pm UTC](https://community.sendbird.com/t/programmatically-set-channel-in-channel-list-v3-beta-2/4671/7 "2023-01-20T15:57:15Z")

</div>

@Alex_Maldonado Have you found a workaround at this point?

---

<div class="post-metadata">

**Author:** ![Tyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.sendbird.com/tyler/32/810_2.png) [@Tyler](https://community.sendbird.com/u/Tyler)\
**Post date:** [January 26, 2023, 5:51am UTC](https://community.sendbird.com/t/programmatically-set-channel-in-channel-list-v3-beta-2/4671/8 "2023-01-26T05:51:34Z")

</div>

There is currently no way to set the channel programmatically in the ChanneList. We do have an open feature request for this but it does not currently have an ETA.
