問題タブ [react-hook-form]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - 反応で選択フィールドの値を取得する方法は?
マテリアル UI で使用しています。ボタンをクリックすると、ボックスの値react-hook-form
を取得したいと思います。autocomplete select
現在label
、value
私が必要としている年は値でなければなりません
ここに私のコードがあります
https://codesandbox.io/s/react-hook-form-get-started-nt4kh
{ title: "The Godfather", year: 1972 },
値を選択すると、 になります1972
。現在ボタンをクリックすると、The Godfather
理由が表示されますか?