Skip to content

Commit

Permalink
Update MultipleSelect.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
aelassas committed Oct 4, 2023
1 parent fca6eba commit 56f1d75
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions backend/src/components/MultipleSelect.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import React, {
useState, useEffect, forwardRef, useRef, useImperativeHandle
} from 'react'
import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle } from 'react'
import {
Autocomplete, TextField, InputAdornment, Avatar, SxProps, Theme, TextFieldVariants, AutocompleteInputChangeReason
Autocomplete,
TextField,
InputAdornment,
Avatar,
SxProps,
Theme,
TextFieldVariants,
AutocompleteInputChangeReason
} from '@mui/material'
import { LocationOn as LocationIcon, AccountCircle } from '@mui/icons-material'
import * as movininTypes from 'movinin-types'
Expand All @@ -12,19 +17,19 @@ import Env from '../config/env.config'
import '../assets/css/multiple-select.css'

const ListBox: React.ComponentType<React.HTMLAttributes<HTMLElement>> = forwardRef((props, ref) => {
const { children, ...rest }: { children?: React.ReactNode } = props
const { children, ...rest }: { children?: React.ReactNode } = props

const innerRef = useRef(null)
const innerRef = useRef(null)

useImperativeHandle(ref, () => innerRef.current)
useImperativeHandle(ref, () => innerRef.current)

return (
// eslint-disable-next-line
<ul {...rest} ref={innerRef} role="list-box">
{children}
</ul>
)
})
return (
// eslint-disable-next-line
<ul {...rest} ref={innerRef} role="list-box">
{children}
</ul>
)
})

function MultipleSelect({
label,
Expand Down

0 comments on commit 56f1d75

Please sign in to comment.