How to use custom function in onChange event handler in React-Hook-Form?

I want to create a form with two MUI Select components. Conference and division are inter-related. Their relationships are described below.

  1. There is a conference corresponding to each division, as shown in the teams array. When a division is selected, the corresponding conference will be automatically selected.

  2. There are 3 divisions in each conference. When a conference is selected, the divisions list will be filtered to include divisions corresponding to that conference, e.g. if Western is selected, the divisions list only includes NorthWest, Pacific and SouthWest.

const teams = [
    {
        "conference": "Eastern",
        "division": "Atlantic"
    },
    {
        "conference": "Eastern",
        "division": "Central"
    },
    {
        "conference": "Eastern",
        "division": "Southeast"
    },
    {
        "conference": "Western",
        "division": "Northwest"
    },
    {
        "conference": "Western",
        "division": "Pacific"
    },
    {
        "conference": "Western",
        "division": "Southwest"
    }
]
export default function Demo() {
    const [divisions, setDivisions] = useState([...new Set(teams.map(obj => obj.division))]);

    const { control, formState: {errors} } = useForm({
        defaultValues: {
            conference: "",
            division: ""
        }
    })

    const conference = useWatch({
        control,
        name: "conference"
    })

    const division = useWatch({
        control,
        name: "division"
    })

    const handleConferenceChange = division => teams.find(obj => obj.division === division)?.conference

    const handleDivisionChange = conference => teams.filter(obj => obj.conference === conference).map(item => item.division)

    return (
        <form>
            <Grid container>
                <Grid xs={6}>
                    <FormControl fullWidth required error={!!errors.conference}>
                        <InputLabel shrink sx={{".MuiInputLabel-asterisk": {color: "error.main"}}}>Conference</InputLabel>
                        <Controller
                            name="conference"
                            control={control}
                            rules={{required: "This field is required."}}
                            render={({ field}) => (
                                <Select
                                    {...field}
                                    displayEmpty
                                    label="Conference"
                                    renderValue={value => value ? value : <InputLabel>-- Select --</InputLabel>}
                                >
                                    {[...new Set(teams.map(obj => obj.conference))].map((conference, index) => <MenuItem key={index} value={conference}>{conference}</MenuItem>)}
                                </Select>
                            )}
                        />
                        {errors.conference && <FormHelperText>{errors.conference?.message}</FormHelperText>}
                    </FormControl>
                </Grid>
                <Grid xs={6}>
                    <FormControl fullWidth required error={!!errors.division}>
                        <InputLabel shrink sx={{".MuiInputLabel-asterisk": {color: "error.main"}}}>Conference</InputLabel>
                        <Controller
                            name="division"
                            control={control}
                            rules={{required: "This field is required."}}
                            render={({ field}) => (
                                <Select
                                    {...field}
                                    displayEmpty
                                    label="division"
                                    renderValue={value => value ? value : <InputLabel>-- Select --</InputLabel>}
                                >
                                    {divisions.map((division, index) => <MenuItem key={index} value={division}>{division}</MenuItem>)}
                                </Select>
                            )}
                        />
                        {errors.division && <FormHelperText>{errors.division?.message}</FormHelperText>}
                    </FormControl>
                </Grid>                
            </Grid>
        </form>
    )
}

Normally react-hook-form will handle the onChange event handler of the Select component so that there is no need to specify the onChange props. However, in my case since conference and division are inter-related, how can I use the handleConferenceChange function in the Select component of conference and use the handleDivisionChange function in the Select component of division? I’ve studied the react-hook-form documentation and searched some tutorials on YouTube. None of them cover my use case. Could someone please teach me how my use case can be implemented using react-hook-form?

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật