-
Notifications
You must be signed in to change notification settings - Fork 17
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
bug: the gap not work #90
Comments
Probably because batching doesn't happen while loading Try to set data-grid-lazy="true" on item element? |
Hi, I'm encountering an issue with columns in which one of the columns with a percentage width doesn't have enough space to fill out its spot when the gap option is set. Here's a pen. |
align: 'justify', independent of gap. If so, change it to align: "center", "start", "end". |
Hi @daybrush, even if I align the columns differently, the layout is not correct. There should be 3 columns instead of 2 as each column has width of |
33.333%, so the sum of the three is 100%. |
Yes, but if I set gap to |
I did sort it out this way btw: <div class="w-full md:w-[calc(50%-(1rem/2))] lg:w-[calc(33.333333%-(1rem/(3/2)))]{% if loop.index === 1 %} lg:pt-40{% elseif loop.index === 3 %} lg:pt-20{% endif %}"> But this is not an ideal solution. The grid library should ideally compute the gap without me adjusting the column width. |
It can't be helped because you set the width yourself. If you expect to automatically change the width, try setting it with the following option. Instead, you must input the columns: 3,
gap: 30;
align: "stretch", |
Ouh nice, that works, thanks! :) One more question, how to handle responsivity when it comes number of columns or gap width? |
Modify the column value directly through resize event or resizeObserver. grid.column = 2 ~ 4 |
Awesome, thank you. It's great library in any case. |
Description
this is a bug?
desc: the gap now work when loading,only work when loaded completely
Steps to check or reproduce
use @egjs/react-grid package will show this problem
The text was updated successfully, but these errors were encountered: