From cc36a91e2ecd88dbb17a755712633e2e85346df3 Mon Sep 17 00:00:00 2001 From: dougfabris Date: Fri, 24 Jun 2022 11:55:31 -0300 Subject: [PATCH] fix: initial members value --- .../components/UserAutoComplete/UserAutoComplete.tsx | 4 ++-- .../UserAutoCompleteMultiple.tsx | 10 +++++----- .../client/sidebar/header/CreateChannelWithData.tsx | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/meteor/client/components/UserAutoComplete/UserAutoComplete.tsx b/apps/meteor/client/components/UserAutoComplete/UserAutoComplete.tsx index b8e23f6e44d3..1b876fc99b2d 100644 --- a/apps/meteor/client/components/UserAutoComplete/UserAutoComplete.tsx +++ b/apps/meteor/client/components/UserAutoComplete/UserAutoComplete.tsx @@ -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 ( diff --git a/apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultiple.tsx b/apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultiple.tsx index b27c6d6034f9..9efda652b61a 100644 --- a/apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultiple.tsx +++ b/apps/meteor/client/components/UserAutoCompleteMultiple/UserAutoCompleteMultiple.tsx @@ -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'; @@ -52,12 +52,12 @@ const UserAutoCompleteMultiple = ({ onChange, ...props }: UserAutoCompleteMultip } renderItem={({ value, label, ...props }): ReactElement => ( )} options={options} diff --git a/apps/meteor/client/sidebar/header/CreateChannelWithData.tsx b/apps/meteor/client/sidebar/header/CreateChannelWithData.tsx index 467f6c23be36..eeb1c46f34cb 100644 --- a/apps/meteor/client/sidebar/header/CreateChannelWithData.tsx +++ b/apps/meteor/client/sidebar/header/CreateChannelWithData.tsx @@ -41,7 +41,7 @@ const CreateChannelWithData = ({ onClose, teamId = '', reload }: CreateChannelWi }, [canCreateChannel, canCreatePrivateChannel]); const initialValues = { - users: [''], + users: [], name: '', description: '', type: canOnlyCreateOneType ? canOnlyCreateOneType === 'p' : true,