mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
* docs(components): update grammar and docs * docs(item): update item documentation and add usage * test(item): add lines test * feat(list): add lines property to override borders on items * feat(item): add lines property to override borders on items * refactor(item): remove old uses of no-lines attribute * fix(item-sliding): update item options to show border - show the border on left options only if in a full list - show the border on both options only if in an inset list (or ios by default) - don’t show border on either for no lines list (and md by default) also renames isRightSide to isEndSide to match the side values * chore(package): update package lock * style(item): fix lint errors * test(item): update item tests * refactor(item): remove the custom styling of last child items instead of us overriding first/last child items to have borders we are going to add to the documentation how to style items with a full border * fix(item): apply border to item inputs for MD mode * docs(components): update docs based on new build * docs(usage): update item usage to show lines being used * fix(item): do not set the padding right to 0 on an item by default * fix(item): cast lines to boolean fixes: #5537 #13218 #12689 #12073 #9112
ion-item-options
The option buttons for an ion-item-sliding. These buttons can be placed either on the start or end side.
You can combine the (ionSwipe) event plus the expandable directive to create a full swipe action for the item.
<ion-item-sliding>
<ion-item>
Item 1
</ion-item>
<ion-item-options side="end" (ionSwipe)="saveItem(item)">
<ion-item-option expandable (click)="saveItem(item)">
<ion-icon name="star"></ion-icon>
</ion-item-option>
</ion-item-options>
</ion-item-sliding>
Side description
| Side | Position | Swipe direction |
|---|---|---|
start |
To the left of the content in LTR, and to the right in RTL. |
From left to right in LTR, and from right to left in RTL. |
end |
To the right of the content in LTR, and to the left in RTL. |
From right to left in LTR, and from left to right in RTL. |
Properties
side
string
The side the option button should be on.
Possible values: "start" and "end".
Defaults to "end".
If you have multiple ion-item-options, a side must be provided for each.
Attributes
side
string
The side the option button should be on.
Possible values: "start" and "end".
Defaults to "end".
If you have multiple ion-item-options, a side must be provided for each.
Events
ionSwipe
Emitted when the item has been fully swiped.
Methods
fireSwipeEvent()
isEndSide()
width()
Built with StencilJS