React.js에서 UIKit을 사용하여 채널을 생성할 때
SBChannelList 에서 상당우측에 있는 신규 그룹채널을 생성 아이콘을 클릭하여 신규그룹채널을 생성할 때 기존에 있는 멤버와 동일한 채널인 경우 새로 생성되는 문제가 발생합니다.
isDistinct값을 true로 하여 설정하는 방법을 알고 자세히 싶습니다.
<SBChannelList
allowProfileEdit={true}
disableAutoSelect={false}
//onBeforeCreateChannel={{isDistinct:true}} 위와 같이 사용하면 onBeforeCreateChannel is not a function 에러가 발생합니다.
isTypingIndicatorEnabled={true}
onChannelSelect={(channel) => {
if (channel && channel.url) {
setCurrentChannelUrl(channel.url)
}
}}
/>
안녕하세요
아래와 같이 function으로 사용하는게 필요 합니다.
const handleOnBeforeCreateChannel = (selectedUsers) => {
const channelParams = {
invitedUserIds: selectedUsers,
isDistinct: true
};
return channelParams;
};
...
<ChannelList
onBeforeCreateChannel={handleOnBeforeCreateChannel}
...
위 내용은 아래 링크에 기재되어 있으니 함께 참조 부탁 드립니다.
# Sendbird UIKit for React samples


[](https://www.npmjs.com/package/sendbird)
Sendbird UIKit for React is a development kit with an user interface that enables an easy and fast integration of standard chat features into new or existing client apps.
### More about Sendbird UIKit for React
Find out more about Sendbird UIKit for React at [UIKit for React doc](https://sendbird.com/docs/uikit/v1/javascript/getting-started/about-uikit). If you need any help in resolving any issues or have questions, visit [our community](https://community.sendbird.com).
<br />
## UIKit components and ways to customize
These samples are here to help you better understand UIKit for React by going over the core components and ways to customize. On each core component sample, there is an attached CodeSandbox link in which you can see the sample codes and alter them to see how the changes are rendered.
<br />
## Before getting started
This file has been truncated. show original
1 Like