does extjs contain method equivalent to inArray? i checked the API but found nothing!
here is the jquery snippet that need urgent conversion:
if ($.inArray(checkbox.inputValue, values) >= 0)
where values is array.
thanks,
Ext JS has Array.indexOf, which does exactly the same thing that the unfortunately-named jQuery.inArray does:
if(values.indexOf(yourValue) !== -1)
Ext.js does not appear to have this function. See http://docs.sencha.com/core/manual/
You can monkey patch this in if you like:
Ext.inArray = function(value, collection) {
return collection.indexOf(value) !== -1;
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With