nice figured out the problem in logic

This commit is contained in:
talksik
2022-05-30 07:00:17 -05:00
parent 738fb7fe16
commit 855972ff2e
@@ -2,6 +2,7 @@ import React, { HTMLAttributes, useCallback, useState } from 'react';
import { import {
Autocomplete, Autocomplete,
AutocompleteRenderOptionState, AutocompleteRenderOptionState,
Button,
Container, Container,
Dialog, Dialog,
FormControl, FormControl,
@@ -10,6 +11,7 @@ import {
InputLabel, InputLabel,
ListItem, ListItem,
Select, Select,
Stack,
styled, styled,
TextField, TextField,
Typography, Typography,
@@ -106,7 +108,14 @@ export default function NewConversationDialog({
<FiX /> <FiX />
</IconButton> </IconButton>
<Container maxWidth="sm"> <Container
maxWidth="sm"
sx={{
display: 'flex',
flexDirection: 'column',
gap: 2,
}}
>
<Autocomplete <Autocomplete
multiple multiple
loading={searching} loading={searching}
@@ -118,18 +127,31 @@ export default function NewConversationDialog({
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}
filterSelectedOptions filterSelectedOptions
filterOptions={(options) => options}
inputValue={searchVal} inputValue={searchVal}
renderInput={(params) => ( renderInput={(params) => (
<TextField <TextField
fullWidth fullWidth
label="Search by name or email" label="People"
{...params} {...params}
placeholder="Favorites" placeholder="Search by name or email"
/> />
)} )}
/> />
<TextField
fullWidth
label="Name (optional)"
placeholder="Channel, subject line, whatever..."
/>
<Stack justifyContent={'flex-end'} direction={'row'} spacing={2}>
<Button variant={'text'}>Cancel</Button>
<Button variant={'contained'} color="primary">
Connect
</Button>
</Stack>
</Container> </Container>
</Container> </Container>
</Dialog> </Dialog>