antd design select placeholder issues antd design select placeholder issues reactjs reactjs

antd design select placeholder issues


set this.state.company to be undefined instead of null.


you should update as below:

<Select     showSearch     optionFilterProp = "children"     placeholder = "Select Company"     value = {this.state.company || undefined} ---- update this line     name = "company"     onSelect = "{this.handleCompanyChange}"    >


It should be set to undefined instead of null or "" empty string.

this.props.form.setFieldsValue({    myFieldName: undefined})