runjuu / column-resizer

🐙 A set of libraries for multi-column(row) resizing
https://column-resizer.runjuu.com
MIT License
30 stars 3 forks source link

fix for multiple column rows in strict mode #1

Closed mattcasey closed 1 year ago

mattcasey commented 1 year ago

First of all, thanks for a really great UX tool. This fix took a while to figure out, what was happening is that if I have more than one instances of ColumnResizer in our production build, dragging a bar on any of the instances would end up moving the equivalent bar in the last instance on the page.

The fix was to move the class field into the constructor instead. I believe this is because class fields behave differently when "use strict" is added [by webpack, in our build]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#binding_this_with_instance_and_static_methods.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
column-resizer ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 13, 2023 6:56am
runjuu commented 1 year ago

Cool! Thanks 👍

runjuu commented 1 year ago

v1.0.2 is published 🙌