-
Notifications
You must be signed in to change notification settings - Fork 826
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
"Lazy" resize rows & columns with a guide line #4396
Conversation
Could you explain the usage case a bit more for this one? The virtual renderer means that column resizing isn't a taxing exercise as only the visible rows are actually resized, the others update as they are drawn. I would like to understand the reasons behind this update a bit more, what actual issue is it addressing or is it just a cosmetic alternative? Cheers Oli |
I think the virtual renderer is great and using it alone with big tables is not an issue. It's really just to boost the performance because the DOM is being updated once instead of multiple times. It's a nice thing to have and heavily inspired by google sheets and ms. excel. |
@olifolkerd this emulates behavior present in Google Sheets, we've found that in practice not updating the cell DOM continually during resizing has a massive positive performance impact for tables with very large cell contents. |
Hey @azmy60 Thanks for the additional details, That makes a lot of sense, and good work putting it on a separate option to allow users to choose. I will look at including this on the 5.7 release next month Cheers Oli :) |
There appears to be a change to the row height calculation function in this that has nothing to do with this functionality. It will also break a lot of other table layout maths. Could you please remove any unrelated changes to this feature from the PR, or explain why you have change it, as it breaks many other parts of the table Cheers Oli :) |
Hi @olifolkerd , Thanks for the comment! Yes, I made a little refactor to the row class so we could have min/max height calculation by its own methods: I couldn't find the min/max height of row to be accessible from outside of the Row class, so I extracted them to their own methods, but I'm not sure which part of it I'm missing or if there's a better solution so let me know! :) |
Hey @azmy60 Thanks for the clarification, i had totally misinterpreted the changes there, that makes a lot of sense. Cheers Oli :) |
Hey @azmy60 Thanks for the cool new functionality, the column resize is very smooth, i will merge it into the 6.0 release. Just a couple of notes:
If you are on the discord, and you havnt already, drop me a message and i will give you the contributor badge :) Cheers Oli :) |
Hi @olifolkerd Thanks for the feedbacks! I always test the codes before submitting it though it's really my fault if something breaks because that could've been something I've missed 🙏. Feel free to ping me if you need me to fix my PRs next time : ) Also just reached out to you on discord. The username is the same as my GitHub username. |
All good, was a couple of quick one line fixes, only took a couple of mins. Great bit of functionality, love the idea! |
Added an option to "lazy" resize the columns and rows, similar to google sheets resizing. This could help reducing the DOM rendering jobs, especially for huge tables!
Also fixed a bug where the resizer doesn't align with mouse if the browser is zoomed in or scaled up:
Fixed it by using
e.clientX/e.clientY
instead ofe.screenX/e.screenY
.refs #4313