I have asked this question but the answer fits only if the options are all in months. What if now, I want to sort them alphabetically?
It looks like this:
and here is my code for the select:
<select className="form-control form-control-sm" name="subscriptions" onChange={this.changeValues}>
{
this.state.variantsData.subscription_plans.map((item, i) => <option key={i} value={item.uuid}>{item.name}</option>)
}
</select>
if this would help, I'll also include what this.state.variantsData.subscription_plans
returns:
thank you in advance for helping me.