// id 来自路由,我使用 rtk 查询挂钩,但查询始终未定义,我从 useGetInquiriesQuery 记录数据
const { id } = useParams();
const validate = (input = values) => {
}
const [values, setValues, errors, setErrors, inputChanged] = useForm(initstate, validate)
const {inquiry} =useGetInquiriesQuery(undefined,{
selectFromResult:({data}) =>({
inquiry:data?.find((i)=> i.orderId === id),
}),
})
useEffect(()=>{
if(inquiry){
console.log(inquiry)
}
},[inquiry])