-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix(resizer): add autoResize.autoHeight
to resize by dataset length
#1820
Conversation
|
cc @zewa666 .... side note, this is the last PR that I wanted to do before pushing a new release. I also fixed yesterday the RowSpan and Excel Export with cell merge. I pushed a bunch of other fixes too since I started using Slickgrid-Vue on a work project, yes finally! 🚀 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1820 +/- ##
========================================
+ Coverage 99.5% 99.5% +0.1%
========================================
Files 187 187
Lines 34467 34496 +29
Branches 10202 10210 +8
========================================
+ Hits 34284 34313 +29
Misses 183 183 ☔ View full report in Codecov by Sentry. |
…ta changes
thats great. I have a reported bug with autoresize and using frozen columns which I need to verify but I will check out this PR together with it. |
The auto-resize is great but it had a flaw that always bothered me but wasn't sure on how to fix it. The problem is that it always resized the grid with all available viewport space regardless of the dataset and in some cases when the dataset was small, it showed a full size grid in the UI with in some cases a rather large empty whitespace area at the bottom of the grid. This PR fixes it once and for all. We always had the grid option
autoHeight
which was good when the user knows its dataset is small, but most of the time we don't know dataset length at all, it could be small today but large next month, so we can't useautoHeight
grid option for that reason.... this PR adds the grid optionautoResize.autoHeight
(yes it's the same flag name but it's not under the same property), it's enabled by default but user could disable it if he wants and it doesn't do anything unlessenableAutoResize
is enabled which is why it's under that group. Another thing that is useful to know is that it's re-validated every time the dataset count changes (by either new data assignment OR data filtering). Lastly we should also note that the we have aautoResize.minHeight
to avoid resizing too small (it was always in place but I increased it to 250px)after fix