-
Notifications
You must be signed in to change notification settings - Fork 12
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
responsive flexLayout example #18
Comments
I think I had an example with angular/flex-layout at some point, but I cannot find it anymore. /cc @buu700 Aren't you using angular/flex-layout? |
Yep, this is what my code looks like:
That's pretty much equivalent to @maku's example except if the ngFor were |
Thanks @buu700! Could you get it working @maku? I'm thinking of adding a clone of static example using the flex lib. |
@dinony @buu700 Does not work for me. I created a little example app (https://stackblitz.com/edit/angular-vscroll) where I show 2 variants (with and without od-virtualscroll) Maybe you can look at it...) TIA |
First thing I've noticed is the operator: from([1,2,3]), which produces an observable of numbers ( |
@dinony it is an Observable of objects which is created from an array.... |
Yep, the objects themselves need to be arrays. |
@dinony I don't get it. I don't think that the observable is the problem. The current state works in some sense (e.g.when you resize the window, you see the items. BUT not in a virtualized way) |
Actually, I'm running into the only-display-on-resize issue as well (along with some other issues like items being rendered with invalid positions). I do have one instance where everything works perfectly with no issues, so I'm currently working on figuring out what's different about that one. Edit: Nevermind. Apparently I actually already got this working and forgot, with the exception of two minor issues that I may create separate tickets for if I can't find anything obviously wrong on my end. |
Ok, I've looked at your example. The problems I see (most of them are not on your side, sry for that) are the following:
The component expects arrays as emitted values, so that's what I meant. Nethertheless, I've forked your stackblitz and adapted it to get a working version. I'll let you know when the dynamic sizing is implemented and follow the angular/flex-layout issue to get updates on that. |
Actually, fxFlex works as expected when forcing the width to be 100% as in my original example. The reason it wasn't working was because he'd put the rule into the component stylesheet without See: fork of your fixed version, fork of the original version (which still suffers from the other issues mentioned). |
Ok, since this is not a bug report, but more a lack of feature, which is already covered here, I will close this one. Feel free to open up, if I overlooked something. |
Ah, got it. I just assumed he wanted a single-column list based on the example, but I only tested it squeezed into the small StackBlitz sidebar.
I meant that my fork of @maku's example to use fxFlex + single-column didn't address the "only displays after resize" or "renders entire list non-virtually" as yours did. |
Everybody using |
It would be really great to have an example / demo where flexLayout is used (e.g. responsive -> row based with wrap and a flex value which is based on the screen size).
e.g. code without od-virtualscroll
I have not really an idea how to code something like this with od-virtualscroll....
The text was updated successfully, but these errors were encountered: