bramkragten / swipe-card

Card that allows you to swipe throught multiple cards for Home Assistant Lovelace
249 stars 36 forks source link

Issue after new HA update: Opening another tab changes swipe view #61

Closed almighty059 closed 1 year ago

almighty059 commented 1 year ago

@bramkragten I recently updated my system to Home Assistant 2022.11.3 and Supervisor 2022.10.2. After doing so, I noticed that the swipe-card view changes when I open a different dashboard view.

My dashboard is made of six different views. Three of those six views have stacks on them that use the swipe-card. If I open either of those three views, the swipe-card will show the first card in the "swipe" like it's supposed to. If I open another dashboard view and then go back, it would normally will still show the first card in the swipe. That changed after I updated HA. Now what happens is when I open another dashboard view and then go back, the swipe-card will no longer be showing the first card of the swipe and instead show the last card. What's strange is that this only happens on two of the three views that have the swipe-card on them. Also, the dashboard view with the swipe-card has to be opened once for it to change. So, for example, if have only opened one of the two views using the swipe-card then only that one will change. The other view that has the swipe-card will show correctly as long as it's the first time I'm opening it.

The opening of the view seems to be what's triggering the issue, but I have no idea why the card on the third view isn't affected. I'll check the type of stack the swipe-card is in and I'll also check the cards inside of the swipe. Maybe something on the card in the third view is different and if it is, I'll update the issue so you know.

almighty059 commented 1 year ago

I found out what was causing the issue. I have the parameter centeredSlides: true so I changed it to centeredSlides: false and they started working correctly. I still don't understand why that setting would make it do that but that's what it was. I'll mark this issue as solved.