From 421b7da6769d4cb62f3417ac69077a823921a1c4 Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Fri, 13 Jan 2017 12:02:38 -0500 Subject: [PATCH] fix(item-sliding): don't error or allow swipes with no options Added items with the following use cases: 1. Sliding item without options 2. Sliding item with one set of dynamic options that toggle 3. Sliding item with two options, one dynamic Removing my code will cause errors in all of the above examples. Fixes #9914 --- src/components/item/item-sliding.ts | 12 +++- .../item/test/sliding/app-module.ts | 5 +- src/components/item/test/sliding/main.html | 66 ++++++++++++++----- 3 files changed, 62 insertions(+), 21 deletions(-) diff --git a/src/components/item/item-sliding.ts b/src/components/item/item-sliding.ts index 6fc416ffb1..b3c8840dd8 100644 --- a/src/components/item/item-sliding.ts +++ b/src/components/item/item-sliding.ts @@ -42,7 +42,7 @@ export const enum ItemSideFlags { }) export class ItemOptions { /** - * @input {string} the side the option button should be on. Defaults to right + * @input {string} the side the option button should be on. Defaults to right. * If you have multiple `ion-item-options`, a side must be provided for each. */ @Input() side: string; @@ -103,7 +103,7 @@ export const enum SlidingState { * * * - + * * * * @@ -125,7 +125,7 @@ export const enum SlidingState { * Archive * * - + * * * + + + + + + + Two options, one dynamic option and text + + + + + + + + + +

HubStruck Notifications

@@ -39,7 +83,7 @@ - @@ -90,7 +134,6 @@
-

RIGHT/LEFT side - icons (item-left)

@@ -146,21 +189,6 @@
- - - One Line, dynamic option - - - - - - @@ -240,6 +268,7 @@ img { height: 100px; } + #download-spinner { display: none; } @@ -247,10 +276,13 @@ svg circle { stroke: white; } + .downloading #download-spinner { display: block; } + .downloading .download-hide { display: none; } +