-
Notifications
You must be signed in to change notification settings - Fork 129
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
swipe-card in layout-card does not update its size #147
Comments
This is an issue with the library underpinning swipe-card (see bramkragten/swipe-card#32), not something that can be fixed by layout-card. |
It’s not though. swipe-card updates its size in vanilla lovelace but not in layout-card. I bet the issue lies with swipe-card and not layout-card and I also understand that a custom card cannot support all other custom cards. |
The reason I say it's not something that can be fixed by layout-card is because the library underpinning swipe-card is documented to only respond when the window resizes.
So there's nothing layout-card could reasonably do to adjust this behavior. On the other hand, swipe-card lets you adjust Swiper parameters - setting "breakpointsBase" to "container" may fix your issue. |
I've mostly fixed it by removing the margin from parent container but, you're right. I'm closing the issue for layout-card |
My Home Assistant version: 2021.5.5
Layout-card version (FROM BROWSER CONSOLE): 2.2.3
What I am doing:
Using swipe-card in custom:grid-layout.
What I expected to happen: The swipe card should update its size to fit the grid
What happened instead: The swipe card only updates its size if the window is resized, looks like
this.swiper.update();
is called. The thing is, in regular lovelace it updates its size, but using custom:masonry-layout it does not so I'm unsure if it's related to swipe-card or layout-card.related bramkragten/swipe-card#32
Minimal steps to reproduce:
Error messages from the browser console: None
By putting an X in the boxes ([X]) below, I indicate that I:
The text was updated successfully, but these errors were encountered: