I'm trying to figure out where I should put my spread operator inside of my Semantic UI form.
<div class="ui selection dropdown">
<input type="hidden" name="gender">
<i class="dropdown icon"></i>
<div class="default text">Gender</div>
<div class="menu" {...gender}>
<div class="item" data-value="0">Male</div>
<div class="item" data-value="1">Female</div>
</div>
</div>
function validate(values) {
const errors = {};
console.log(values.gender);
}
Currently you can see I have my spread operator, {...gender}, in the div with class menu. When I select from the dropdown box it willlog undefined.
Anyone have an idea?
onChangeproperty ondiv.