Skip to content

Commit

Permalink
fix: initial members value
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris committed Jun 24, 2022
1 parent 51fe2c5 commit cc36a91
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ const UserAutoComplete = ({ value, ...props }: UserAutoCompleteProps): ReactElem
onChange={props.onChange as any}
filter={filter}
setFilter={setFilter}
renderSelected={({ value, label }): ReactElement => {
renderSelected={({ value, label }): ReactElement | null => {
if (!value) {
undefined;
return null;
}

return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AutoComplete, Box, Option, Chip } from '@rocket.chat/fuselage';
import { AutoComplete, Box, Option, OptionAvatar, OptionContent, Chip } from '@rocket.chat/fuselage';
import { useMutableCallback, useDebouncedValue } from '@rocket.chat/fuselage-hooks';
import React, { ComponentProps, memo, ReactElement, useMemo, useState } from 'react';

Expand Down Expand Up @@ -52,12 +52,12 @@ const UserAutoCompleteMultiple = ({ onChange, ...props }: UserAutoCompleteMultip
}
renderItem={({ value, label, ...props }): ReactElement => (
<Option key={value} {...props}>
<Option.Avatar>
<OptionAvatar>
<UserAvatar username={value} size='x20' />
</Option.Avatar>
<Option.Content>
</OptionAvatar>
<OptionContent>
{label} <Option.Description>({value})</Option.Description>
</Option.Content>
</OptionContent>
</Option>
)}
options={options}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const CreateChannelWithData = ({ onClose, teamId = '', reload }: CreateChannelWi
}, [canCreateChannel, canCreatePrivateChannel]);

const initialValues = {
users: [''],
users: [],
name: '',
description: '',
type: canOnlyCreateOneType ? canOnlyCreateOneType === 'p' : true,
Expand Down

0 comments on commit cc36a91

Please sign in to comment.