mirror of
https://github.com/mattermost/focalboard.git
synced 2025-01-23 18:34:02 +02:00
Not requesting for channels in personal server mode (#3429)
This commit is contained in:
parent
3da7ca8e74
commit
95b65dba22
@ -348,15 +348,20 @@ export default function ShareBoardDialog(props: Props): JSX.Element {
|
||||
className={'userSearchInput'}
|
||||
cacheOptions={true}
|
||||
loadOptions={async (inputValue: string) => {
|
||||
const users = await client.searchTeamUsers(inputValue)
|
||||
const channels = await client.searchUserChannels(match.params.teamId || '', inputValue)
|
||||
const result = []
|
||||
if (Utils.isFocalboardPlugin()) {
|
||||
const users = await client.searchTeamUsers(inputValue)
|
||||
if (users) {
|
||||
result.push({label: intl.formatMessage({id: 'shareBoard.members-select-group', defaultMessage: 'Members'}), options: users || []})
|
||||
}
|
||||
const channels = await client.searchUserChannels(match.params.teamId || '', inputValue)
|
||||
if (channels) {
|
||||
result.push({label: intl.formatMessage({id: 'shareBoard.channels-select-group', defaultMessage: 'Channels'}), options: channels || []})
|
||||
}
|
||||
} else {
|
||||
const users = await client.searchTeamUsers(inputValue) || []
|
||||
result.push(...users)
|
||||
}
|
||||
return result
|
||||
}}
|
||||
components={{DropdownIndicator: () => null, IndicatorSeparator: () => null}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user