Tree Data Optimizations/Fixes and Single Column Resize
This new version brings a lot of Tree Data Optimizations and Fixes. We now also have single column resize by content (enabled in all grids)
Tree Data
- refactor flat to tree structure and vice versa to optimize speed, it seems to be ~40-50x faster 😮🚀
- yes it is incredibly faster, especially on first page load (previous implementation of converting from flat to tree structure was quite slow, there are specific npm libs that do a much better job at doing that than my own implementation), it wasn't working with 100k rows before but now it does 💯
- there's a lot of fixes and new features, you can see all features in the new Tree Data - Wiki and demos Example 5 / Example 6
- for a complete list of all features/enhancements (30+ changes), you can take a look at these 2 PRs #326 / #336 which have checklist of all the changes
Single Column Resize (double-click / header menu)
This new feature is enabled in all grids by default (and as any other feature of the lib, there's flag to disable it too). This new action is very similar to Excel column resize, it will read through the entire dataset (max at 5k rows) and calculate what width it requires to display all the text (it's not an autofit, it's really a resize by content calculation). The feature comes from a reuse of the code that was put in place to handle an entire Grid Resize by Content that was shipped in previous version except that now we also have a single column resize (the default grid resize will always be autofit in viewport).
- available via a double-click on the resize icon handle (between 2 columns), this is quite similar to how you can resize a column in Excel
- available via a new column header menu action ("Resize by Content")
- the single column resize uses the same options as the full grid resize by content, see all the available option below (just a hint, column
resizeMaxWidthThreshold
is an option I often use) - a new Resize by Content - Wiki
Resize by Content Option - Small Breaking Change
Because there were many resize options ending up in the Grid Option, I moved all of them into a new ResizeByContentOption
, you can see all info in the new Resize by Content - Wiki
Enjoying the lib?
Make sure to upvote ⭐ and/or Buy Me a Coffee ☕ ... and if you already have, well thank you 😺
Cheers and Happy Coding
Features
- addon: provide grid menu labels for all built-in commands (44c72d3)
- editors: add
compositeEditorFormOrder
option (03f2d66) - editors: add ways to preload date without closing date picker (3088038)
- resizer: add
resizeByContentOnlyOnFirstLoad
grid option (ffe7dc4) - resizer: add single Column Resize by Content dblClick & headerMenu (683389f)
- services: add onBeforeResizeByContent (onAfter) (3e99fab)
- styling: add new marker material icons for project (9b386fa)
- tree: improve Tree Data speed considerably (5487798)
- editors: replace jQuery with native elements (d6e8f4e)
Bug Fixes
- backend: able to preset filters on hidden columns & all queried (f1d92cd)
- backend: able to preset filters on hidden columns & all queried (c610979)
- editors: select editor inline blur save before destroy (0e591b1)
- formatters: Tree Data use nullish coallescing w/optional chaining (f6cf14c)
- frozen: rollback previous commit since the issue was found in SlickGrid (core) (780bcd7)
- presets: loading columns presets should only be done once (4273aa9), closes #341
- resizer: fix a regression bug caused by previous PR #341 (462e330)
- resizer: remove delay to call resize by content to avoid flickering (961efe6)
- services: fix couple of issues found with custom grid views (db06736)
- sorting: multi-column sort shouldn't work when option is disabled (bfc8651)
- styling: add a better search filter magnify glass icon as placeholder (5464824)
- styling: center horizontally checkbox selector in column header (bb5aebc)
- styling: dart-sass deprecation warnings use math utils instead (b5d8103)
- tree: Tree Data export should also include correct indentation (f1e06c1)
- tree: couple of issues found in Tree Data, fixes #307 (e684d1a)
- editors: revert to jquery element for aurelia-slickgrid to work (4d6c358)