[英]React-select & creatable select with reatc-hook-form focus on validation error
使用 controller 作為 react-select 組件,但沒有使用 Controller 的“render”方法中的 prop“field”,因此,未設置 ref 元素以幫助 react-hook-form 設置焦點。
工作示例: 代碼沙箱
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.