update switch on api response
Hello !!
I'm currently using refine to make an app and i have a from in which i set every field with
register
but i have a switch which is not updating even if the value from react hook form is correct. For the other mui component ( Textfiled, select ...) i do not have to create a state to have the correct value in the field but the switch is not working. Should i make a state for switch only ?5 Replies
foreign-sapphire•2y ago
Hi 👋 This should work as expected.
please change name field according to your field name.
if this not work please reproduce the issue on some platform. i will happy to debug 🙏
adverse-sapphire•2y ago
Thank you @alicanerdurmaz ! where can i find the documentation about this ?
foreign-sapphire•2y ago
i found here 🙏
https://react-hook-form.com/api/usecontroller/controller/
adverse-sapphire•2y ago
It work perfectly !! Thank you
foreign-sapphire•2y ago
I'm glad to hear that 👊 have a nice day 🚀