// material-ui import { Button, CardContent, Grid, TextField, Autocomplete } from '@mui/material'; import MainCard from "../../components/MainCard"; import {useForm} from "react-hook-form"; import { useState} from "react"; import * as React from "react"; // ==============================|| DASHBOARD - DEFAULT ||============================== // const UserSearchForm_Individual = ({applySearch}) => { const [type, setType] = useState([]); const [accountFilter, setAccountFilter] = useState("Active"); const { reset, register, handleSubmit } = useForm() const onSubmit = (data) => { let typeArray = []; for(let i =0; i < type.length; i++){ typeArray.push(type[i].label); } const temp = { username: data.userName, fullenName: data.fullenName, email: data.email, phone: data.phone, accountFilter: accountFilter, }; applySearch(temp); }; function resetForm(){ setType([]); reset(); } return (
{/*row 1*/} Search Form {/*row 2*/} { if (newValue !== null){ setAccountFilter(newValue); } }} renderInput={(params) => ( )} /> {/**/} {/* */} {/**/} {/*last row*/}
); }; export default UserSearchForm_Individual;