autocomplete sort of working and not bad!
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
|||||||
IconButton,
|
IconButton,
|
||||||
InputBase,
|
InputBase,
|
||||||
InputLabel,
|
InputLabel,
|
||||||
|
ListItem,
|
||||||
Select,
|
Select,
|
||||||
styled,
|
styled,
|
||||||
TextField,
|
TextField,
|
||||||
@@ -79,7 +80,9 @@ export default function NewConversationDialog({
|
|||||||
|
|
||||||
const renderOption = useCallback(
|
const renderOption = useCallback(
|
||||||
(props: HTMLAttributes<HTMLLIElement>, option: User, state: AutocompleteRenderOptionState) => (
|
(props: HTMLAttributes<HTMLLIElement>, option: User, state: AutocompleteRenderOptionState) => (
|
||||||
<Typography>{option.email}</Typography>
|
<ListItem {...props}>
|
||||||
|
<Typography>{option.email}</Typography>
|
||||||
|
</ListItem>
|
||||||
),
|
),
|
||||||
[],
|
[],
|
||||||
);
|
);
|
||||||
@@ -112,7 +115,7 @@ export default function NewConversationDialog({
|
|||||||
autoHighlight
|
autoHighlight
|
||||||
onInputChange={handleChangeSearchInput}
|
onInputChange={handleChangeSearchInput}
|
||||||
options={searchUsersResults}
|
options={searchUsersResults}
|
||||||
// renderOption={renderOption}
|
renderOption={renderOption}
|
||||||
getOptionLabel={(option) => (typeof option === 'string' ? option : option.displayName)}
|
getOptionLabel={(option) => (typeof option === 'string' ? option : option.displayName)}
|
||||||
value={selectedUsers}
|
value={selectedUsers}
|
||||||
onChange={handleSelectUser}
|
onChange={handleSelectUser}
|
||||||
|
|||||||
Reference in New Issue
Block a user