Open ArMikael opened 7 years ago
Could you add a fiddle/codepen? Could have something to do with the css.
Sure. I added codepen with my code here: http://codepen.io/ArMikael/pen/qRKmov Thanks for your answer.
Definitely css related. What is the idea of all the vanillajs resizing? Try to strip the code, avoid using display inline block for the vs repeat container and don't specify a set width for the repeat.
The idea is show all roles with all permissions. Administrator can select which roles' permissions to show by choosing specific roles on the right side panel. The issue is that some clients has up to 10,000 roles and list of permission is growing up with each new version. We expect scrolls in both axes - X and Y. Probably we don't need virtual scroll for Y-axis with permissions' names, but we do need it for the list of roles and current status of each permission/role. So we need to support virtual horizontal scroll. We need both scrolls on the same container for both X and Y. It's impossible to do in a standard way, because on scrolls will be at the end of list and will be available after scrolling to the end. That's why we need dynamic width with vanilla JS.
What is the idea of all the vanillajs resizing?
It allows us to check how many roles do we have, sum the overall width and create clone of horizontal scroll outside of the container. We actually make original scroll hidden and putting his clone under the container. Such changes allows to user to scroll in both axes in comfortable way.
avoid using display inline block for the vs repeat container and don't specify a set width for the repeat.
I use inline block for vs-repeat parent container and on list items (li) and vs-repeat is on ul. I've tried to remove inline block from parent container but it doesn't help.
Hi Kamil,
Can you explain please what I'm doing wrong?
avoid using display inline block for the vs repeat container
How can I ignore inline-block for horizontal scroll? If I not define li as inline-blocks they are all goes vertical, not horizontal.
avoid using display inline block for the vs repeat container and don't specify a set width for the repeat.
Even if I remove display: inline-block and width from li virtual scroll is still doesn't works in my case.
Can you give me some recommendations how to fix it?
Hi guys, For some reason horizontal vs is not working for me. I see all directive's inserts like $vs_collection in DOM, but when I also see there all 200 items instead of 10-12 that I expect to see there. Please, give me some ideas, maybe I missed something.