kendo ui - Force DropDownList to use list instead of ActionSheet for mobile -
i'm working on ipad app using kendo , dropdownlist throwing actionsheet. i'd force use web ui list style. how can this?
for interested able hack solution. here's function accepts kendomobileview argument , applies fix.
//hack force dropdowns act comboboxes in mobile! utils.fix.dropdownlists = function(view) { var dropdowns = view.element.find("[data-role='dropdownlist']"); //iterate through dropdown elements _.each(dropdowns, function(item){ var comp = $(item).data("kendodropdownlist"); if(comp && comp.popup) { comp.popup.bind("open", function(event){ event.sender.element.parent().removeclass("km-popup km-widget"); if(event.sender.element.parent().hasclass("km-popup")) { //prevent default open animation. //then remove classes , open popup programitcally //easy peasy, lemon squeezy event.preventdefault(); event.sender.element.parent().removeclass("km-popup km-widget"); settimeout(function(){ event.sender.open(); },0); } }); } }); }
Comments
Post a Comment