[FIX] Create Discussion modal - Parent room input not displaying correct room name #22580

pull/22582/head
gabriellsh 4 years ago committed by GitHub
parent f03539639d
commit 7b1c021a9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      client/components/CreateDiscussion/DefaultParentRoomField.tsx

@ -1,6 +1,7 @@
import { Skeleton, Select, Callout } from '@rocket.chat/fuselage';
import { Skeleton, TextInput, Callout } from '@rocket.chat/fuselage';
import React, { useMemo, ReactElement } from 'react';
import { roomTypes } from '../../../app/utils/client/lib/roomTypes';
import { useTranslation } from '../../contexts/TranslationContext';
import { AsyncStatePhase } from '../../hooks/useAsyncState';
import { useEndpointData } from '../../hooks/useEndpointData';
@ -29,12 +30,9 @@ const DefaultParentRoomField = ({
return <Callout type={'error'}>{t('Error')}</Callout>;
}
const { _id, fname, name } = value?.room;
return (
<Select
options={[[_id, (fname || name) as string]]}
value={_id}
<TextInput
value={roomTypes.getRoomName(value.room.t, value.room)}
disabled
onChange={(): string => ''}
/>

Loading…
Cancel
Save