Unable to set Select field value through ref in antd
<Select
allowClear
showSearch
placeholder="Please select"
className="onclick_field_width"
ref={ref}
>
<Select.Option className="option-tab" value="Fulltime">
Fulltime
</Select.Option>
<Select.Option className="option-tab" value="Internal Contractor">
Internal Contractor
</Select.Option>
<Select.Option className="option-tab" value="Third Party Contractor">
Third Party Contractor
</Select.Option>
</Select>
using below code to get ref value but getting undefined.
<button onClick={() => handleRef()}>Clear field</button>;
const handleRef = () => {
console.log("show ref::", ref.current.value);
};
if I use the same code with <Input/> field it works like a charm
ref.current.input.value.
Please help.