Row Detail with inner Grids #1531
Replies: 2 comments 8 replies
-
didnt have this use case so far. we show a nested grid in a modal bit we're using iframes ;) the only thing to adress your problem I could think off is a listener for viewport change + presets as you mentioned |
Beta Was this translation helpful? Give feedback.
-
If I take Angular out of the picture for a moment and if I understand correctly, the problem is that some (html) Elements are complex/expensive to (re)-create and they should not be removed from the DOM when they get outside the viewport. If so, then you need (1) a way to know you shouldn't do that and (2) move the element to an invisible stash when it's outside the viewport and restore the element when the row gets visible again.
probably this should remember the row/column in the grid, so it can be used when restoring.
E.g. <angular-slickgrid>
<div class="gridPane" ...>
<div class="slickgrid-container">
...
<div class="stash">
</div>
</div>
</div>
<angular-slickgrid>
and a css style on |
Beta Was this translation helpful? Give feedback.
-
@jr01 @zewa666 hey guys, I'm currently working on Row Detail with inner Grids for the past 2 weeks and got most of it working but I was wondering if you guys know of any ways to maybe cache dynamically created component and reapplied them to target element? What do I mean by this? Let's step back a little to understand the problem, SlickGrid uses Virtual Scroll, which mean that anytime you scroll, any rows that gets out of the viewport are just being discarded and recreated only when that row gets back in the viewport when scrolling. So going back to Row Detail, anytime that we scroll and some of the Row Detail gets out of the viewport, it uses the same technique of discarding (or destroying in our use case) and the problem behind this is that with inner grid and certain actions are done in that inner grid, well.. this new state will be lost when the Row Detail is being destroyed and eventually scrolled back into the viewport. So I was wondering if we could somehow keep the dynamically created component instance in a cache and then reapply that instance whenever it comes back into the viewport (side note, for Row Detail, I created my own Angular util to create dynamic component)
Angular-Slickgrid/src/app/modules/angular-slickgrid/services/angularUtil.service.ts
Lines 48 to 58 in d058102
Are there anything else we can do if caching doesn't work? Yes, we can use the Grid State/Presets (possibly using Session Storage) and save/reapply when in/out of viewport... however that would have to be implemented by the developer (not by the library)
So anyway, just thought of asking for feedback :)
Starting to be really close to be on par with paid grids (Ag-Grid, SyncFusion, ....)
Beta Was this translation helpful? Give feedback.
All reactions