{"action":"created","issue":{"url":"https://api.github.com/repos/vmware/clarity/issues/704","repository_url":"https://api.github.com/repos/vmware/clarity","labels_url":"https://api.github.com/repos/vmware/clarity/issues/704/labels{/name}","comments_url":"https://api.github.com/repos/vmware/clarity/issues/704/comments","events_url":"https://api.github.com/repos/vmware/clarity/issues/704/events","html_url":"https://github.com/vmware/clarity/issues/704","id":221161891,"node_id":"MDU6SXNzdWUyMjExNjE4OTE=","number":704,"title":"datagrid checkbox-column is not shown if the [(clrDgSelected)] model  is undefined before the component initiation","user":{"login":"ghvm2014","id":7811184,"node_id":"MDQ6VXNlcjc4MTExODQ=","avatar_url":"https://avatars0.githubusercontent.com/u/7811184?v=4","gravatar_id":"","url":"https://api.github.com/users/ghvm2014","html_url":"https://github.com/ghvm2014","followers_url":"https://api.github.com/users/ghvm2014/followers","following_url":"https://api.github.com/users/ghvm2014/following{/other_user}","gists_url":"https://api.github.com/users/ghvm2014/gists{/gist_id}","starred_url":"https://api.github.com/users/ghvm2014/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghvm2014/subscriptions","organizations_url":"https://api.github.com/users/ghvm2014/orgs","repos_url":"https://api.github.com/users/ghvm2014/repos","events_url":"https://api.github.com/users/ghvm2014/events{/privacy}","received_events_url":"https://api.github.com/users/ghvm2014/received_events","type":"User","site_admin":false},"labels":[{"id":452262122,"node_id":"MDU6TGFiZWw0NTIyNjIxMjI=","url":"https://api.github.com/repos/vmware/clarity/labels/wontfix","name":"wontfix","color":"e6e6e6","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-04-12T06:17:05Z","updated_at":"2018-10-23T16:51:51Z","closed_at":"2017-04-12T22:55:11Z","author_association":"NONE","body":"<!--\r\nPLEASE FILL OUT THE FOLLOWING. WE MAY CLOSE INCOMPLETE ISSUES.\r\n-->\r\n\r\n**Select one ...**  (check one with \"x\")\r\n```\r\n*[ ] bug\r\n[ ] feature request\r\n[ ] enhancement\r\n```\r\n\r\n### Expected behavior\r\n<!-- Describe the expected behavior. -->\r\n1. when i defined a datagrid with [(clrDgSelected)]=\"userSelectedLists\".\r\n2. if we define a variable \" userSelectedLists\" in typescript file but not init it with value.\r\n   class component{\r\n   .....\r\n  userSelectedLists: any[];\r\n   ''''\r\n   }\r\n3. then i will reinit this variable in the page load function (clrWizardPageOnLoad).\r\n4. The checkbox column should be displayed.\r\n\r\nworkround:\r\nclass component{\r\n   .....\r\n  userSelectedLists: any[] = [];\r\n   ''''\r\n   }\r\nGive it  a value when  creating the component.\r\n\r\n### Actual behavior\r\n<!-- Describe the actual behavior and provide a minimal app that demonstrates the issue. Fork one of the Clarity Plunker Templates and recreate the issue. Then submit your link with the issue. -->\r\n1. when i defined a datagrid with [(clrDgSelected)]=\"userSelectedLists\".\r\n2. if we define a variable \" userSelectedLists\" in typescript file but not init it with value.\r\n   class component{\r\n   .....\r\n  userSelectedLists: any[]\r\n   ''''\r\n   }\r\n3. then i will init this variable in the page load function (clrWizardPageOnLoad).\r\n4. The checkbox column is not displayed.\r\n### Reproduction of behavior\r\n<!-- Include a working plunker link reproducing the behavior. -->\r\n<!-- Clarity Plunker Tempplates -->\r\n<!-- Clarity Version: [Latest](https://plnkr.co/8TwwdL) -->\r\n<!-- Clarity Version: [0.7.6](https://plnkr.co/iWrQNL) -->\r\n\r\n### Environment details\r\n\r\n* **Angular version:** 2.0.X\r\n2.0.x\r\n* **Clarity version:** \r\n0.8.13\r\n* **OS and version:** \r\nwin10\r\n* **Browser:** [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]\r\n"},"comment":{"url":"https://api.github.com/repos/vmware/clarity/issues/comments/432329293","html_url":"https://github.com/vmware/clarity/issues/704#issuecomment-432329293","issue_url":"https://api.github.com/repos/vmware/clarity/issues/704","id":432329293,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjMyOTI5Mw==","user":{"login":"youdz","id":4647197,"node_id":"MDQ6VXNlcjQ2NDcxOTc=","avatar_url":"https://avatars3.githubusercontent.com/u/4647197?v=4","gravatar_id":"","url":"https://api.github.com/users/youdz","html_url":"https://github.com/youdz","followers_url":"https://api.github.com/users/youdz/followers","following_url":"https://api.github.com/users/youdz/following{/other_user}","gists_url":"https://api.github.com/users/youdz/gists{/gist_id}","starred_url":"https://api.github.com/users/youdz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youdz/subscriptions","organizations_url":"https://api.github.com/users/youdz/orgs","repos_url":"https://api.github.com/users/youdz/repos","events_url":"https://api.github.com/users/youdz/events{/privacy}","received_events_url":"https://api.github.com/users/youdz/received_events","type":"User","site_admin":false},"created_at":"2018-10-23T16:51:51Z","updated_at":"2018-10-23T16:51:51Z","author_association":"CONTRIBUTOR","body":"We can't investigate unless you post a reproduction of your issue on StackBlitz, but it looks like you are initializing `[(clrDgSelected)]` on the datagrid with an empty array and `[(clrDgSelected)]=\"userGroup.selected\"` to various values on the rows themselves. The selection can't both be empty *and* some rows, so the two input values you're giving are incompatible. As such, we emit an output which synchronizes them, and this triggers the ExpressionChangedAfterItHasBeenCheckedError in Angular.\r\n\r\nIf you want to discuss all this, please ask the question on [StackOverflow](https://stackoverflow.com/questions/tagged/vmware-clarity) with the `vmware-clarity` tag, and we'll answer it in more detail. We try not to encourage questions on GitHub, just bug reports and feature requests."}}
{"actor":{"display_login":"youdz"}}