{"action":"created","issue":{"url":"https://api.github.com/repos/ionic-team/ionic/issues/9655","repository_url":"https://api.github.com/repos/ionic-team/ionic","labels_url":"https://api.github.com/repos/ionic-team/ionic/issues/9655/labels{/name}","comments_url":"https://api.github.com/repos/ionic-team/ionic/issues/9655/comments","events_url":"https://api.github.com/repos/ionic-team/ionic/issues/9655/events","html_url":"https://github.com/ionic-team/ionic/issues/9655","id":195888107,"number":9655,"title":"Conditional on VirtualScroll causes no content to be displayed in any case","user":{"login":"AleFons","id":4713306,"avatar_url":"https://avatars1.githubusercontent.com/u/4713306?v=4","gravatar_id":"","url":"https://api.github.com/users/AleFons","html_url":"https://github.com/AleFons","followers_url":"https://api.github.com/users/AleFons/followers","following_url":"https://api.github.com/users/AleFons/following{/other_user}","gists_url":"https://api.github.com/users/AleFons/gists{/gist_id}","starred_url":"https://api.github.com/users/AleFons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AleFons/subscriptions","organizations_url":"https://api.github.com/users/AleFons/orgs","repos_url":"https://api.github.com/users/AleFons/repos","events_url":"https://api.github.com/users/AleFons/events{/privacy}","received_events_url":"https://api.github.com/users/AleFons/received_events","type":"User","site_admin":false},"labels":[{"id":311009737,"url":"https://api.github.com/repos/ionic-team/ionic/labels/v2","name":"v2","color":"313744","default":false},{"id":336372079,"url":"https://api.github.com/repos/ionic-team/ionic/labels/virtualscroll","name":"virtualscroll","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2016-12-15T19:07:08Z","updated_at":"2018-02-09T03:25:36Z","closed_at":null,"author_association":"NONE","body":"**Ionic version:**  (check one with \"x\")\r\n[ ] **1.x**\r\n[X] **2.x**\r\n\r\n**I'm submitting a ...**  (check one with \"x\")\r\n[X] bug report\r\n[ ] feature request\r\n[ ] support request => Please do not submit support requests here, use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/\r\n\r\n**Current behavior:**\r\nConditional on VirtualScroll causes no content to be displayed, even if there should be content. This is on rc4.\r\n\r\n**Expected behavior:**\r\nIf there's a conditional, it should still work if the condition returns true. It used to work like this on rc2.\r\n\r\n**Related code:**\r\nhtml:\r\n```\r\n    <ion-list [virtualScroll]=\"dataStorage\" [headerFn]=\"headerFn\" *ngIf=\"dataStorage\">\r\n    \r\n        <ion-item-divider *virtualHeader=\"let header\" class=\"dividers\">\r\n            {{ header }}\r\n        </ion-item-divider>\r\n        \r\n        <button ion-item *virtualItem=\"let data\" (click)=\"openData(data.id)\">\r\n            {{ data }}\r\n        </button>\r\n    </ion-list>\r\n```\r\nts:\r\n```\r\n    headerFn(record,recordIndex,records){\r\n        if( recordIndex == 0){\r\n            return;\r\n        }\r\n        return null;\r\n    }\r\n```\r\n\r\n**Other information:**\r\nIf I take the same code and take out the *ngIf=\"dataStorage\", it displays correctly.\r\n\r\n**Ionic info:** (run `ionic info` from a terminal/cmd prompt and paste output below):\r\n\r\n```\r\nCordova CLI: 6.3.1\r\nIonic Framework Version: 2.0.0-rc.4\r\nIonic CLI Version: 2.1.17\r\nIonic App Lib Version: 2.1.7\r\nIonic App Scripts Version: 0.0.47\r\nios-deploy version: Not installed\r\nios-sim version: Not installed\r\nOS: Windows 10\r\nNode Version: v6.7.0\r\nXcode version: Not installed\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ionic-team/ionic/issues/comments/364324438","html_url":"https://github.com/ionic-team/ionic/issues/9655#issuecomment-364324438","issue_url":"https://api.github.com/repos/ionic-team/ionic/issues/9655","id":364324438,"user":{"login":"442623641","id":16473810,"avatar_url":"https://avatars2.githubusercontent.com/u/16473810?v=4","gravatar_id":"","url":"https://api.github.com/users/442623641","html_url":"https://github.com/442623641","followers_url":"https://api.github.com/users/442623641/followers","following_url":"https://api.github.com/users/442623641/following{/other_user}","gists_url":"https://api.github.com/users/442623641/gists{/gist_id}","starred_url":"https://api.github.com/users/442623641/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/442623641/subscriptions","organizations_url":"https://api.github.com/users/442623641/orgs","repos_url":"https://api.github.com/users/442623641/repos","events_url":"https://api.github.com/users/442623641/events{/privacy}","received_events_url":"https://api.github.com/users/442623641/received_events","type":"User","site_admin":false},"created_at":"2018-02-09T03:25:36Z","updated_at":"2018-02-09T03:25:36Z","author_association":"NONE","body":"fixed:\r\n@ViewChild('virtualScroll', { read: VirtualScroll }) virtualScroll: VirtualScroll;\r\n\r\nsetTimeout(() => {\r\n                this.virtualScroll['_ctrl'].readReady.emit();\r\n                setTimeout(() => this.virtualScroll['_ctrl'].writeReady.emit(), 300);\r\n            }, 300)"}}
{"actor":{"display_login":"442623641"}}