add auto close functionality in mobile view and remove selected item in mobile view