Autocomplete select box supports optgroups and removing of selected opts

Added support optgroups and selected options are now removing from dropdown.