// material-ui import { Button, CardContent, Grid, TextField, Typography } 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 OrganizationSearchForm = ({applySearch}) => { const [type, setType] = useState([]); 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 = { brNo: data.brNo, enCompanyName: data.enCompanyName, chCompanyName: data.chCompanyName, }; applySearch(temp); }; function resetForm(){ setType([]); reset(); } return (
{/*row 1*/} Search Form {/*row 2*/} {/*last row*/}
); }; export default OrganizationSearchForm;