From efcdd20508e1f35c6e4e27c957907e081e16171b Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Wed, 15 Jun 2016 03:18:54 +0200 Subject: [PATCH] fix(item): sliding item's width must be 100% #closes 6239 --- src/components/item/item-sliding.scss | 2 + .../virtual-scroll/test/sliding-item/index.ts | 58 +++++++++++++++++++ .../test/sliding-item/main.html | 33 +++++++++++ 3 files changed, 93 insertions(+) create mode 100644 src/components/virtual-scroll/test/sliding-item/index.ts create mode 100644 src/components/virtual-scroll/test/sliding-item/main.html diff --git a/src/components/item/item-sliding.scss b/src/components/item/item-sliding.scss index 49d77ff95eb..1630fd1c0bb 100644 --- a/src/components/item/item-sliding.scss +++ b/src/components/item/item-sliding.scss @@ -8,6 +8,8 @@ ion-item-sliding { position: relative; display: block; overflow: hidden; + + width: 100%; .item { position: static; diff --git a/src/components/virtual-scroll/test/sliding-item/index.ts b/src/components/virtual-scroll/test/sliding-item/index.ts new file mode 100644 index 00000000000..49b8b08dbff --- /dev/null +++ b/src/components/virtual-scroll/test/sliding-item/index.ts @@ -0,0 +1,58 @@ +import {Component, ViewChild, ElementRef} from '@angular/core'; +import {ionicBootstrap, Platform} from '../../../../../src'; + + +@Component({ + templateUrl: 'main.html' +}) +class E2EPage { + items: any[] = []; + webview: string; + + @ViewChild('content') content: ElementRef; + + constructor(platform: Platform) { + for (var i = 0; i < 200; i++) { + this.items.push({ + value: i, + someMethod: function() { + return '!!'; + } + }); + } + + if (platform.is('ios')) { + if (window.indexedDB) { + this.webview = ': WKWebView'; + + } else { + this.webview = ': UIWebView'; + } + } + } + + headerFn(record: any, index: number, records: any[]) { + if (index % 4 === 0) { + return index + ' is divisible by 4'; + } + + return null; + } + + reload() { + window.location.reload(true); + } + +} + + +@Component({ + template: '' +}) +class E2EApp { + root = E2EPage; +} + +ionicBootstrap(E2EApp, null, { + prodMode: true +}); diff --git a/src/components/virtual-scroll/test/sliding-item/main.html b/src/components/virtual-scroll/test/sliding-item/main.html new file mode 100644 index 00000000000..71899a9d410 --- /dev/null +++ b/src/components/virtual-scroll/test/sliding-item/main.html @@ -0,0 +1,33 @@ + + Virtual Scroll{{webview}} + + + + + + + + + + + + Header: {{header}} + + + + Item: {{item.value}} {{item.someMethod()}} + + + + + + + + + + + +