adopted-ember-addons / adopted-ember-addons/ember-light-table
querySelector errors when resizing columns in 2.x
- Dominant language
- JavaScript
- Stars
- 311
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
Using `ember-light-table` version `2.0.0-beta.4` and Ember 3.9, I am seeing these thrown when using the resize handles to alter a column's width, which breaks any following attempts to resize the same column:
```
TypeError: table.querySelector(...) is null [lt-column-resizer.js:89]
TypeError: null has no properties [lt-column-resizer.js:89]
```
It appears that the selectors here in [/addon/components/lt-column-resizer.js](https://github.com/offirgolan/ember-light-table/blob/2-x/addon/components/lt-column-resizer.js#L94) are not finding a matching element and thus triggering the error -- compare to [pre-2.x](https://github.com/offirgolan/ember-light-table/blob/master/addon/components/lt-column-resizer.js#L93) which used jQuery instead of querySelector, which IIRC will not error out if the selector fails. I'd guess this difference is most likely causing this issue.
Also to note, I attempted to work around this by turning on `enableScaffolding` in the table body, but it seems to still not generate the scaffolding cells -- poking around the templates, it seems these might only generate in the header when using sub-columns (I'm providing a flat column array).
Contributor guide
Assessment
This issue has not been assessed yet.