{"action":"created","issue":{"url":"https://api.github.com/repos/ng-select/ng-select/issues/742","repository_url":"https://api.github.com/repos/ng-select/ng-select","labels_url":"https://api.github.com/repos/ng-select/ng-select/issues/742/labels{/name}","comments_url":"https://api.github.com/repos/ng-select/ng-select/issues/742/comments","events_url":"https://api.github.com/repos/ng-select/ng-select/issues/742/events","html_url":"https://github.com/ng-select/ng-select/issues/742","id":349867404,"node_id":"MDU6SXNzdWUzNDk4Njc0MDQ=","number":742,"title":"Angular: Passing down data using @Input()","user":{"login":"softwareishappiness","id":4998003,"node_id":"MDQ6VXNlcjQ5OTgwMDM=","avatar_url":"https://avatars1.githubusercontent.com/u/4998003?v=4","gravatar_id":"","url":"https://api.github.com/users/softwareishappiness","html_url":"https://github.com/softwareishappiness","followers_url":"https://api.github.com/users/softwareishappiness/followers","following_url":"https://api.github.com/users/softwareishappiness/following{/other_user}","gists_url":"https://api.github.com/users/softwareishappiness/gists{/gist_id}","starred_url":"https://api.github.com/users/softwareishappiness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softwareishappiness/subscriptions","organizations_url":"https://api.github.com/users/softwareishappiness/orgs","repos_url":"https://api.github.com/users/softwareishappiness/repos","events_url":"https://api.github.com/users/softwareishappiness/events{/privacy}","received_events_url":"https://api.github.com/users/softwareishappiness/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-13T02:15:48Z","updated_at":"2018-08-14T00:59:03Z","closed_at":"2018-08-13T06:05:17Z","author_association":"NONE","body":"I have three component-- Component A, Component B and Component C. Component A wraps Component B. Component B wraps Component C. If I use @Input() in each component, will changes to options in the root component pass through the nested components to Component C? See the \"pseudo code\" below:\r\n\r\n    <component-a [options]=\"options\">\r\n      <component-b [options]=\"options\">\r\n        <component-c [options]=\"options\">\r\n        </component-c>\r\n      </component-b>\r\n    </component-a>\r\n\r\nI asked this question because when options changes in the root component of the application I need to do some filtering at each nested component. However, I have noticed some unusual behavior with a third-party component that doesn't seem to receive `options`? I can elaborate further after the first part of this question is answered.\r\n\r\nI believe the answer to the question is \"Yes\". So here is the second part. How do I update `<ng-select>` when the components are wraps as follows:\r\n\r\n    <component-a [options]=\"options\">\r\n      <component-b [options]=\"options\">\r\n        <ng-select [items]=\"options\" [(ngModel)]=\"selectedOption\">\r\n        </ng-select>\r\n      </component-b>\r\n    </component-a>\r\n\r\nWhen the documentation for `<ng-select>` says the following:\r\n\r\n> **Change Detection**\r\n> \r\n> Ng-select component implements OnPush change detection which means the\r\n> dirty checking checks for immutable data types. That means if you do\r\n> object mutations like:\r\n> \r\n>     this.items.push({id: 1, name: 'New item'})\r\n> \r\n> Component will not detect a change. Instead you need to do:\r\n> \r\n>     this.items = [...this.items, {id: 1, name: 'New item'}];\r\n> \r\n> This will cause the component to detect the change and update. Some\r\n> might have concerns that this is a pricey operation, however, it is\r\n> much more performant than running ngDoCheck and constantly diffing the\r\n> array.\r\n\r\nSo how do I ensure changes to `options` is reflected in `<ng-select>`?\r\n"},"comment":{"url":"https://api.github.com/repos/ng-select/ng-select/issues/comments/412717048","html_url":"https://github.com/ng-select/ng-select/issues/742#issuecomment-412717048","issue_url":"https://api.github.com/repos/ng-select/ng-select/issues/742","id":412717048,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjcxNzA0OA==","user":{"login":"softwareishappiness","id":4998003,"node_id":"MDQ6VXNlcjQ5OTgwMDM=","avatar_url":"https://avatars1.githubusercontent.com/u/4998003?v=4","gravatar_id":"","url":"https://api.github.com/users/softwareishappiness","html_url":"https://github.com/softwareishappiness","followers_url":"https://api.github.com/users/softwareishappiness/followers","following_url":"https://api.github.com/users/softwareishappiness/following{/other_user}","gists_url":"https://api.github.com/users/softwareishappiness/gists{/gist_id}","starred_url":"https://api.github.com/users/softwareishappiness/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/softwareishappiness/subscriptions","organizations_url":"https://api.github.com/users/softwareishappiness/orgs","repos_url":"https://api.github.com/users/softwareishappiness/repos","events_url":"https://api.github.com/users/softwareishappiness/events{/privacy}","received_events_url":"https://api.github.com/users/softwareishappiness/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T00:59:03Z","updated_at":"2018-08-14T00:59:03Z","author_association":"NONE","body":"I have three components that we are composed of `ng-select`. It would be helpful if we could get a response. If we have to drop `ng-select` we will have lost significant work. Is there any way or place I can get assistance. We would consider employing you as well. "}}
{"actor":{"display_login":"softwareishappiness"}}