when the select's options don't match the list item options, it should be rebuilt. Fixes #1240

This commit is contained in:
scottjehl 2011-03-15 12:00:39 -04:00
parent b56626fba1
commit 83e7aeb4a5

View file

@ -359,7 +359,7 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
return options.index( this );
}).get();
if( !self.options.nativeMenu && ( forceRebuild || select[0].options.length > self.list.find('li').length )){
if( !self.options.nativeMenu && ( forceRebuild || select[0].options.length != self.list.find('li').length )){
self._buildList();
}