Skip to content

Commit

Permalink
[FIX] UserAutoComplete not rendering UserAvatar correctly (#25055)
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris committed Apr 4, 2022
1 parent 3bedb58 commit df694bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/components/UserAutoComplete/UserAutoComplete.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AutoComplete, Option, Box, Chip, Avatar } from '@rocket.chat/fuselage';
import { AutoComplete, Option, Box, Chip, Options } from '@rocket.chat/fuselage';
import { useDebouncedValue } from '@rocket.chat/fuselage-hooks';
import React, { memo, useMemo, useState } from 'react';

Expand Down Expand Up @@ -38,7 +38,9 @@ const UserAutoComplete = (props) => {
</Chip>
);
}}
renderItem={({ value, ...props }) => <Option key={value} {...props} avatar={<Avatar value={value} />} />}
renderItem={({ value, ...props }) => (
<Option key={value} avatar={<UserAvatar size={Options.AvatarSize} username={value} />} {...props} />
)}
options={options}
/>
);
Expand Down

0 comments on commit df694bb

Please sign in to comment.