-
-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IE <= 10] Column, Row, Table: static properties (reopen, ...) not inherited #436
Comments
Thank you for reporting this issue! I was able to reproduce it in IE10 and IE9 as well.
Your assessment is correct. Furthermore, I have found that all three This makes sense, as all three share the same specialty: they are "real" ES6 classes intermingled with export default class Column extends EmberObject.extend({
// ..
}) {
constructor() {
// ...
}
} I'm gonna work off of that assumption, but would love it, if you could verify or disprove that. |
I'm pretty sure, that I've identified the error. The prototype chain isn't set up correctly. I would argue, that this is due to IE10 not supporting IE10IE11 |
https://babeljs.io/docs/usage/caveats/#internet-explorer-classes-10-and-below- |
I don't really see a reason, why these three classes were implemented in such a way, but it's been so right from the beginning. Most likely to enable using The cleanest fix is discarding the ES6 magic and exclusively using good ol' Alternatively we could either:
|
Third option: feature-detect |
If you use Table.__proto__.reopen({
getColumns() {
return this.get('columns');
}
});
const t = new Table([{ label: 'foo' }], []);
console.log(t.getColumns()) |
@alexander-alvarez We can either document this quirk as the official way going forward and call it a day or attempt to feature-detect and conditionally polyfill. |
I'll give polyfilling a shot tomorrow and we'll see how it works out. |
@mastastealth The issue has been resolved in # if you're using yarn
yarn add offirgolan/ember-light-table#master
# or npm
npm install --save offirgolan/ember-light-table#master |
I have a component using the table that does a little bit of customizations via reopen. Oddly enough, only 2 of the 10 seem to fail. I get a:
TypeError: Object doesn't support property or method 'reopen'
...in IE10 for
TableHeaderMixin
andColumnClass
(though disablingColumnClass
makes the other work, so I think it is the maint culprit).However,
reopen
ingLightTable
,Header
,Footer
,Row
,Column
,Cell
, andSortableObjects
works just fine. Firefox reopens all of them too, so is there anything in particular I should know aboutColumnClass
giving errors? 🤔As an example, when I have IE10 console log the
ColumnClass
for me (before reopening) it returns:which seems to be the correct function. Unfortunately I tried to get a twiddle of this, but ember-twiddle doesn't work on IE10 either! 😅
The text was updated successfully, but these errors were encountered: