-
Notifications
You must be signed in to change notification settings - Fork 13.5k
feat: expandable option should not snap back immediately on gesture release #27794
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
Comments
Thanks for the report. Part of the problem here is the description of
The documentation notes this to mean that you can use the However, the behavior where the expanded option snaps back is definitely not correct. Our current thinking is the expanded option should stay expanded on gesture-release, and |
ion-item-sliding
does not expand to full width when swiped / ionSwipe
event triggered too easily
Going to mark this as a feature since we likely need to expose a new method to do this properly. |
Could this be clarified in the docs? It currently sounds very much like the full width of the |
There was confusion on ionic-team/ionic-framework#27794 about which element is used as the reference for "full width". An expandable option will expand to cover the full width of the parent `ion-item` when swiped, so I made that clear in the docs.
This means that the option can take up the full width of the parent |
Would also be helpful if the ionSwipe event fired on the button that is expanded, not on the containing ion-item-options. It's not clear firstly where the event fires or what it is sending. None of the ion-item-option examples show any events at all. |
Prerequisites
Ionic Framework Version
v6.x
Current Behavior
The docs for
ion-item-sliding
state the following:The
ion-item-options
docs further state thationSwipe
is "emitted when the item has been fully swiped."However, I am seeing none of this behavior, at least not as I expect.
On the other hand, the
ion-item-option
docs states of theexpandable
attribute that, "if true, the option will expand to take up the available width and cover any other options," which seems to be subtly different, and pretty much what the actual behavior is.Currently, an item will never stay expanded. After releasing the extra swipe, the expanded item instantly snaps back to normal width.
Also, the
ionSwipe
event is triggered after very little extra distance has been covered; hardly "fully swiped" by any means.Expected Behavior
I expect the expanded option to expand to the full width of the item and stay like that.
I expect the
ionSwipe
event to only be fired once this has happened.Steps to Reproduce
ionSwipe
listener to theion-item-options
and log calls.Code Reproduction URL
No response
Ionic Info
Actually Windows 11.
Additional Information
Relevant/potentially relevant issues:
Video of reproduction:
Screen_Recording_20230713_103818_Chrome.mp4
The text was updated successfully, but these errors were encountered: