import { Box, Select } from "@chakra-ui/react"; import { useEffect } from "react"; import { Row } from "../../../interfaces/dialog"; interface Props { row: Row; index: number; handleChange: (value: string | boolean, index: number) => void; } const SelectField: React.FC = (props) => { useEffect(() => { if(props.row.default) { props.row.options?.map((option) => { if(props.row.default === option.value) { props.handleChange(option.value, props.index); } }); } }, []); return ( <> ); }; export default SelectField;