import AutoCompleteSelect from "@/app/component/element/AutoCompleteSelect"; import SwitchContent from "./SwitchContent"; import RadioContent from "./RadioContent"; import { filterList } from "@/helper"; import { useState } from "react"; const gender = ["زن", "مرد", "هر دو"]; const degree = ["پزشک عمومی", "پزشک متخصص", "پزشک فوق تخصص", "همه موارد"]; function Form({ data, changeUrl, changeData }) { const [list, setList] = useState({}); const { parentList, childrenList } = filterList(data); console.log(filterList(data)); return ( <> { const newData = changeData(value, "specialties", true); setList(filterList(newData)); console.log(newData); }} /> {!!childrenList.length && (
changeData(value, "specialties")} sendAll={true} value={data.specialties?.name} label="تخصص" />
)}
); } export default Form;