Smart-Table
Smart-Table copied to clipboard
Ordering with more than one ordering function doesn't display change active row in IE10/11
I added a comment to the original issue with similar title about a month back, but it looks like that's closed and it might not be getting any attention (https://github.com/lorenzofox3/Smart-Table/issues/405#issuecomment-111625652)
In any case, in @lorenzofox3's working plunk, it doesn't appear to be working in IE10/11? Anyone know why?
because Function.name is not supported by internet explorer
Ah, ok - so you leave it to whomever to decide to mokey patch in IE by toString() and then check or do something like the following http://plnkr.co/edit/y2wUXuDMyOTQBjD1lnUY?p=preview ? relevant bit would be something like
$scope.orderring = {
firstName: (function () {
var ret = function (value) {
return value.firstName;
};
ret.name = "firstName";
return ret;
}()),
lastName: (function () {
var ret = function (value) {
return value.lastName;
};
ret.name = "lastName";
return ret;
}())
}
Maybe it will do the trick, to be honest I was not aware of the issue in IE 15min ago :). But in general I am not a big fan of adding code to the core of smart table to support IE or other old browsers.
yeah, I mean either of those approaches should work -- monkey patch in this case frightens me a little -- I have to write the sorts anyway, it's not such a big deal to consciously expose a .name property and that works everywhere... Seems to work in the gist anyway. Might be worth adding a note in the docs and closed issues at least?
Ok, I'll add a note on the doc or you can submit a PR on the documentation website
This PR https://github.com/lorenzofox3/Smart-Table/pull/612 will fix it.
I'm guessing we'll finish discussing that PR, make changes, and get it pulled in a couple of days.