I would like to ask why does my dropdown can't hold the value after selecting.
ClientMaintenancePage.js
/* Dropdown */
const optionsBrstn = [
'BIC', 'BRSTN', 'Bank Name'
];
const defaultOption = options[0];
<form className="form-horizontal form-group">
<Dropdown options={optionsBrstn} onSelect={_onSelect} value={defaultOption} placeholder="Select an option" />
<div className="text-right mt-2">
<MDBBtn color="indigo" type="button" onClick={() => {}}>Add</MDBBtn>
<MDBBtn color="indigo" type="button" onClick={() => {}}>Delete</MDBBtn>
<MDBBtn color="indigo" type="button" onClick={() => {}}>Save</MDBBtn>
</div>
</form>
It was originally this._onSelect, however I am not using a class component that's why I cannot use the this keyword.
May I know what approach can I use for this using React hooks.
TIA