Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_getOptions = () => {
const { country } = this.props;
const countryIdx = CountryRegionData.findIndex(
c => c[0] == country || c[1] == country
);
let options = [];
if (countryIdx) {
const regions = CountryRegionData[countryIdx][2].split("|");
options = regions.map(region => {
const splitted = region.split("~");
return {
value: splitted[1],
label: splitted[0]
};
});
}
return options;
};
_getValue = () => {
_getOptions = () => {
return CountryRegionData.map(c => {
return {
value: c[1],
label: c[0]
};
});
};
_getValue = () => {