gfranko / jquery.selectBoxIt.js

A jQuery Select Box Plugin for Mobile, Tablet, and Desktop
http://www.selectboxit.com
MIT License
852 stars 301 forks source link

The remaining code is not executed if dropdown doesn't contain that value #404

Open cliftonlueilwitz opened 1 year ago

cliftonlueilwitz commented 1 year ago

The plugin is awesome I love it!

I am facing one issue where the remaining code does not get executed if dropdown doesn't contain that value. For this consider I am setting the customer object food_item attribute to a value other than that is not present.

function updateFoodDetails(customer){
customer.food_item = plastic
$("#food_item").data("selectBox-selectBoxIt").selectOption(customer.food_item);
// execute remaining code like setting other form fields.....
}

the remaining code is not getting executed and it is exiting from that method from that point where selectOption method is executed. I am not sure how can I debug and resolve this. Can you please look into this and if possible provide a possible solution @gfranko ?