I'm using Material UI Auto complete to get list of countries, and I need to get the selected country id to send back to database.
<Autocomplete
options={this.state.countries.map(option => option.name_en + ` (${option.name_native})`)}
id="discountType"
value={this.state.makeCountry}
onChange={(e, value) => this.logCountry(e, value)}
renderInput={(params) =>
<TextField
{...params}
variant="outlined"
label="Select make country"
/>}
/>
I need to send option.id to logCountry function alongside the value.