{"action":"created","issue":{"url":"https://api.github.com/repos/formly-js/ngx-formly/issues/1163","repository_url":"https://api.github.com/repos/formly-js/ngx-formly","labels_url":"https://api.github.com/repos/formly-js/ngx-formly/issues/1163/labels{/name}","comments_url":"https://api.github.com/repos/formly-js/ngx-formly/issues/1163/comments","events_url":"https://api.github.com/repos/formly-js/ngx-formly/issues/1163/events","html_url":"https://github.com/formly-js/ngx-formly/issues/1163","id":356547679,"node_id":"MDU6SXNzdWUzNTY1NDc2Nzk=","number":1163,"title":"formarraytype component does not notice less row updated model","user":{"login":"enricooliva","id":11843561,"node_id":"MDQ6VXNlcjExODQzNTYx","avatar_url":"https://avatars2.githubusercontent.com/u/11843561?v=4","gravatar_id":"","url":"https://api.github.com/users/enricooliva","html_url":"https://github.com/enricooliva","followers_url":"https://api.github.com/users/enricooliva/followers","following_url":"https://api.github.com/users/enricooliva/following{/other_user}","gists_url":"https://api.github.com/users/enricooliva/gists{/gist_id}","starred_url":"https://api.github.com/users/enricooliva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enricooliva/subscriptions","organizations_url":"https://api.github.com/users/enricooliva/orgs","repos_url":"https://api.github.com/users/enricooliva/repos","events_url":"https://api.github.com/users/enricooliva/events{/privacy}","received_events_url":"https://api.github.com/users/enricooliva/received_events","type":"User","site_admin":false},"labels":[{"id":197471517,"node_id":"MDU6TGFiZWwxOTc0NzE1MTc=","url":"https://api.github.com/repos/formly-js/ngx-formly/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-03T15:36:24Z","updated_at":"2018-09-06T09:00:27Z","closed_at":null,"author_association":"NONE","body":"\r\n```\r\n[ ] bug report => search github for a similar issue or PR before submitting\r\n[ ] feature request\r\n[ x] support request\r\n```\r\n\r\nI use a custom component [DatatableTypeComponent](https://formly-js.github.io/ngx-formly/examples/advanced/datatable-integration)\r\n\r\nwhen I load the model the first time always is ok \r\nwhen I update the model with less rows \r\n```\r\ninvestments:[{\r\ninvestmentName:\"project1\"\r\ninvestmentDate:\"\"\r\nstockIdentifier:1\r\n}]\r\n\r\n```\r\nsome empty objects {} appear in the array.\r\n\r\nMy solution is: \r\nin the component I filter from the model the empty object\r\n\r\n```\r\nngDoCheck() {    \r\n    let ma = this.model as Array<any>;    \r\n    this.model = ma.filter(x => Object.keys(x).length !== 0);         \r\n}\r\n\r\n```\r\nis related to the issue #648 ? there is some better solution?\r\n"},"comment":{"url":"https://api.github.com/repos/formly-js/ngx-formly/issues/comments/419019531","html_url":"https://github.com/formly-js/ngx-formly/issues/1163#issuecomment-419019531","issue_url":"https://api.github.com/repos/formly-js/ngx-formly/issues/1163","id":419019531,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTAxOTUzMQ==","user":{"login":"enricooliva","id":11843561,"node_id":"MDQ6VXNlcjExODQzNTYx","avatar_url":"https://avatars2.githubusercontent.com/u/11843561?v=4","gravatar_id":"","url":"https://api.github.com/users/enricooliva","html_url":"https://github.com/enricooliva","followers_url":"https://api.github.com/users/enricooliva/followers","following_url":"https://api.github.com/users/enricooliva/following{/other_user}","gists_url":"https://api.github.com/users/enricooliva/gists{/gist_id}","starred_url":"https://api.github.com/users/enricooliva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enricooliva/subscriptions","organizations_url":"https://api.github.com/users/enricooliva/orgs","repos_url":"https://api.github.com/users/enricooliva/repos","events_url":"https://api.github.com/users/enricooliva/events{/privacy}","received_events_url":"https://api.github.com/users/enricooliva/received_events","type":"User","site_admin":false},"created_at":"2018-09-06T09:00:27Z","updated_at":"2018-09-06T09:00:27Z","author_association":"NONE","body":"@aitboudad I made the example \r\n\r\nwith two button to reproduce the issue:\r\nload full data and load less data.\r\n\r\nWhen I click to load less data the grid remain with two empty rows.\r\n\r\nhttps://stackblitz.com/edit/angular-formly-datatable-a3d7ui\r\n\r\n"}}
{"actor":{"display_login":"enricooliva"}}