You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
<ion-item-options side="left"> appears on right side (Ionic4) #14293
I'm submitting a ... (check one with "x")
[x] bug report
[ ] feature request
Current behavior:
The <ion-item-options side="left"> buttons appear when swiping from right to left, as if the side attribute was ignored.
If another <ion-item-options> is present in the same <ion-item-sliding> element, all buttons are stacked on the right side.
Expected behavior:
Buttons in <ion-item-options side="left"> element should appear on the left, i.e. when swiping from left to right.
Steps to reproduce:
Try swiping an item from left to right: nothing happens, even though some <ion-item-options side="left"> element(s) have been specified in code.
Swipe an item from right to left: buttons appear, as if they had been specified with side="right"
<ion-item-sliding><ion-item><ion-label>Item with left options only</ion-label></ion-item><ion-item-optionsside="left"><ion-item-optiononClick="favorite(item)">Favorite</ion-item-option><ion-item-optioncolor="danger" onClick="share(item)">Share</ion-item-option></ion-item-options></ion-item-sliding>
Other information:
Occurs since @ionic/core version 0.2.2 and 4.0.0-alpha.1 (current)
BTW, I also noticed in the item-sliding component README that we still refer to "right side" and "swip[ing] from right to left", which I guess is reversed in RTL.
I can submit a PR to make the wording more explicit, e.g.:
By default, the buttons are placed on the "end" side. This means that options are revealed when the sliding item is swiped from end to start, i.e. from right to left in LTR, but from left to right in RTL. To place them on the opposite side, so that they are revealed when swiping to the opposite direction, set the side attribute to "start" on the ion-item-options element.
@ghybs Good catch! If you'd like to create a PR I'd be happy to get it merged in. Whatever you think makes the most sense. I think a table would be helpful or we could link back to item options. Although that is currently outdated too. 😁
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.
Activity
brandyscarney commentedon Apr 11, 2018
Thanks for the issue! The values for
sidewere renamed fromlefttostartandrighttoend. I noticed we didn't have this included in the breaking changes so I added it here: https://github.com/ionic-team/ionic/blob/master/angular/BREAKING.md#item-optionsI noticed that updating these in your plunker is not fixing them, but this should be working on the next alpha release.
ghybs commentedon Apr 11, 2018
Hi,
Thank you for clearing things up!
I will be happy to test it in the next release.
For reference, here is an updated plunker with
"start"and"end"values forsideattribute:http://plnkr.co/edit/GlD85AB62QlFisudQ7Ep?p=preview
BTW, I also noticed in the
item-slidingcomponent README that we still refer to "right side" and "swip[ing] from right to left", which I guess is reversed in RTL.I can submit a PR to make the wording more explicit, e.g.:
Or maybe a table could be more suitable, as done in
buttonscomponent README for example?ghybs commentedon Apr 11, 2018
Looks like I was partially wrong:
When direction is set to
rtl, buttons are now placed on the other side (i.e. on the left, irrespective of thesideattribute value for now), but the swiping direction to reveal them is still the same, i.e. you have to swipe from right to left, which reveals… nothing until you reach the far left of the screen, where buttons are now placed.http://plnkr.co/edit/PJRHOr91V9QNkMyn8NRt?p=preview
Should I open a separate bug report for this?
brandyscarney commentedon Apr 11, 2018
@ghybs Good catch! If you'd like to create a PR I'd be happy to get it merged in. Whatever you think makes the most sense. I think a table would be helpful or we could link back to item options. Although that is currently outdated too. 😁
ghybs commentedon Apr 14, 2018
Hi,
Just to confirm that with the brand new release
4.0.0-alpha.2, this now works indeed:http://plnkr.co/edit/GLKIUKHpGTM2JkchqTUU?p=preview
Thanks a lot for the good work!
However this still does not work in RTL.
Opening a separate issue for that.
ionitron-bot commentedon Sep 1, 2018
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.