Column resize problem #5396
-
Is it possible to implement column resize without using inline styles in react table v8 ? I imitated how the performant sample works inthr docs but on my code review we want to avoid inline styles. Is there any way to do that? We also don't use css in js. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Yeah, for sure. I don't think most people use inline styles at all. We set up the examples that way because it's just a neutral way to show the required styles all in 1 file in a code sandbox. Though, for the column widths themselves from column.getSize(), it doesn't make much of a difference if using a direct style or a CSS variable. I've always said that a couple inline styles here and there for frequently changing values are fine, if not better in some situations. |
Beta Was this translation helpful? Give feedback.
Ok. Please explain why you need to avoid inline styles at all cost. Did you hear from someone that they are bad practice or something? They are only bad practice if they are overused. They are useful and necessary for lots of use cases, including this.