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
[Ionic V4.0.0-beta.7] [ion-item-sliding] Sliding not working after empty an element in array #15486
Comments
I got the same issue. |
@quynh-ng I have the same issue, i've had to downgrade to beta.5 :( |
Funny, just landed on that problem too, could confirm, if I delete with an action on item of the sliding list, the remaining items could not be slided anymore p.s.: in beta.8 it's the case too |
@quynh-ng same -_- |
Also had the same issue, with a dynamic list of elements, deleting an item with the component, then refreshing the elements cause it not to be able to delete any other elements until a refresh. After digging around i noticed that without the refresh of elements it worked fine, looking at the docs there is a method to close all sliding items on the item or on the list. using this fixed the issue.
Hope this helps in the meantime, i am new to angular so hopefully i am not doing anything that stupid. |
not all heroes wear capes, thx @jcollings for the solution! html:
ts:
|
@peterpeterparker it works fine but is it a solution or a workaround ? |
@Anthony2539 probably a bit of both 😜 I don't know if it's a feature request or a bug Some commit regarding slidings have been made recently I think, so maybe the problem is/will disappear Anyhow, let's say that workaround works and won't arm my app I guess |
I'd say it's more a bug since i had to downgrade to get my e2e tests to pass again |
This issue is obviously a bug. Remove an item should not need to close it before deleting, it's funny. |
I found that another workaround is to pass the reference to the ItemSliding to the delete method and then just closing that one item before deleting the list item: HTML:
TS:
|
@mimacom-klier Thank you very much for solving my problem perfectly. |
not work for me !!! |
Workaround does not work for me, with or without calling |
@bockoblur: I checked out your Stackblitz example and played around with it for a bit. If you actually delete the items from the list, the workaround seems to work fine. If they are merely hidden and then shown again, the behavior is exactly as you described. This seems to be an issue with the transform: translate not being correctly applied to the list item element. Maybe the ItemSliding component still uses the old DOM reference to translate the item. You can find my modified example here: https://stackblitz.com/edit/ionic-4-item-sliding-show-hide-error-zxgbmf |
Thanks for looking into this. It works ok. |
@mimacom-klier workaround works for me on latest Ionic (4.5.0). |
EDIT: Using @jcollings solution additionally works for adding and/or updating an item, which caused the same problem for me. Thank you! This solution works for me using: However, I believe this is still an issue that should be fixed, I doubt any developer would expect this behaviour. |
Same for me. Work-around shmorkaround. Main thing is it gets me out of a big hole and I am grateful to @jcollings for that |
Wauw .. was wrapping my head all day about this (also had the slide not working after updating the list items). Now found out why. Thankx @jcollings for the workaround. Hope this bug will be fixed. |
Hi, Facing the below issue: Issue: Tried the work around suggested by @jcollings. Tried closing all ion item sliding when leaving the view as follows:
but didn't work. My slider code is as follows:
Have tried with latest ionic version 4.0.0-rc.0. The issue still exists. |
Hi, Have tried playing around with this issue and found that in my case the culprit for Ion Item Slider become unresponsive was that whenever the view was getting changed the sliding options were not getting closed. So I did the following thing & it worked perfectly:
Many thanks to @jcollings. |
I've donne this :
works perfectly |
Can confirm that the issue still exists with 4.0.0-rc.0. |
Can confirm this exists in 4.0.0-rc.1 as well |
This bug still exist in 4.0.0-rc.2. Another workaround. It works for me.
|
Dear Brandy, @brandyscarney can you take a look ? we are in migration phase to v4 and i would like to hear ionic-team opinion. Looks me important issue. big thanks. |
Thanks for tagging me! I added it to our project board to look into. |
Thanks for this issue! This has been merged in by PR #17492. It will be in the next release: |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
Ionic Info
Run
ionic info
from a terminal/cmd prompt and paste the output below.Describe the Bug
I created an array of 3 elements and i used the and the <ion-item-sliding">directive to show a list of sliding item. Each item has a remove button to remove the target element, but after removing one element the sliding stop working for the remaining items
Steps to Reproduce
Steps to reproduce the behavior:
Related Code
Expected Behavior
the sliding is suppose to work correctly for each items even after removing an element
Additional Context
List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, screenshots, OS if applicable, etc.
The text was updated successfully, but these errors were encountered: