{"action":"opened","issue":{"url":"https://api.github.com/repos/angular/material2/issues/13025","repository_url":"https://api.github.com/repos/angular/material2","labels_url":"https://api.github.com/repos/angular/material2/issues/13025/labels{/name}","comments_url":"https://api.github.com/repos/angular/material2/issues/13025/comments","events_url":"https://api.github.com/repos/angular/material2/issues/13025/events","html_url":"https://github.com/angular/material2/issues/13025","id":358060213,"node_id":"MDU6SXNzdWUzNTgwNjAyMTM=","number":13025,"title":"Flat tree model does not pickup change of expandable property","user":{"login":"empijei","id":1256049,"node_id":"MDQ6VXNlcjEyNTYwNDk=","avatar_url":"https://avatars1.githubusercontent.com/u/1256049?v=4","gravatar_id":"","url":"https://api.github.com/users/empijei","html_url":"https://github.com/empijei","followers_url":"https://api.github.com/users/empijei/followers","following_url":"https://api.github.com/users/empijei/following{/other_user}","gists_url":"https://api.github.com/users/empijei/gists{/gist_id}","starred_url":"https://api.github.com/users/empijei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/empijei/subscriptions","organizations_url":"https://api.github.com/users/empijei/orgs","repos_url":"https://api.github.com/users/empijei/repos","events_url":"https://api.github.com/users/empijei/events{/privacy}","received_events_url":"https://api.github.com/users/empijei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-07T13:07:52Z","updated_at":"2018-09-07T13:07:52Z","closed_at":null,"author_association":"NONE","body":"#### Bug, feature request, or proposal:\r\nBug. I'm trying to live-update a flat tree but the \"expandable\" property change is not picked up by Angular.\r\n\r\n#### The code sample\r\n[StackBlitz Demo](https://stackblitz.com/edit/angular-ud8ipn-ac148m?file=app%2Ftree-dynamic-example.ts) which demonstrates the issue.\r\n\r\nIn the example please look to the following code at line 63:\r\n```ts\r\n    setTimeout(() => {\r\n      for (let node of this.data) {\r\n        if (node.item == 'Unfolded') {\r\n          node.expandable = true;\r\n          console.log(\"Change applied\");\r\n          break;\r\n        }\r\n      }\r\n      console.log(\"Firing change\");\r\n      console.log(this.data);\r\n      this.dataChange.next(this.data);\r\n    }, 1000);\r\n```\r\nA screenshot of the console:\r\n\r\n![image](https://user-images.githubusercontent.com/1256049/45220141-7e215480-b2ad-11e8-84f6-e16240c60b49.png)\r\n\r\nA screenshot of the page afterwards:\r\n![image](https://user-images.githubusercontent.com/1256049/45220233-c6d90d80-b2ad-11e8-87c4-46ee3ab1dbc3.png)\r\n\r\n#### Detailed Reproduction Steps: \r\n1. Add a node to a flat tree model, set to non-expandable;\r\n1. After the node is drawn, set the node to expandable;\r\n1. Fire the change event;\r\n\r\n#### What is the expected behavior?\r\nThe chevron to appear on the left.\r\n\r\n### What is the current behavior?\r\nThe node is still unexpandable.\r\n\r\n#### What is the use-case or motivation for changing an existing behavior?\r\nI would expect not to have to remove and re-add the node in order for angular to add the chevron.\r\n\r\n#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?\r\nAFAIK chrome and FF, latest version of Angular Material."}}
{"actor":{"display_login":"empijei"}}