{"action":"created","issue":{"url":"https://api.github.com/repos/SAP/openui5/issues/1822","repository_url":"https://api.github.com/repos/SAP/openui5","labels_url":"https://api.github.com/repos/SAP/openui5/issues/1822/labels{/name}","comments_url":"https://api.github.com/repos/SAP/openui5/issues/1822/comments","events_url":"https://api.github.com/repos/SAP/openui5/issues/1822/events","html_url":"https://github.com/SAP/openui5/issues/1822","id":281786499,"number":1822,"title":"sap.m.Tree - JsonModel - Filter - arrayNames","user":{"login":"FiddleBe","id":18117870,"avatar_url":"https://avatars1.githubusercontent.com/u/18117870?v=4","gravatar_id":"","url":"https://api.github.com/users/FiddleBe","html_url":"https://github.com/FiddleBe","followers_url":"https://api.github.com/users/FiddleBe/followers","following_url":"https://api.github.com/users/FiddleBe/following{/other_user}","gists_url":"https://api.github.com/users/FiddleBe/gists{/gist_id}","starred_url":"https://api.github.com/users/FiddleBe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FiddleBe/subscriptions","organizations_url":"https://api.github.com/users/FiddleBe/orgs","repos_url":"https://api.github.com/users/FiddleBe/repos","events_url":"https://api.github.com/users/FiddleBe/events{/privacy}","received_events_url":"https://api.github.com/users/FiddleBe/received_events","type":"User","site_admin":false},"labels":[{"id":85376367,"url":"https://api.github.com/repos/SAP/openui5/labels/approved","name":"approved","color":"FFBF7F","default":false}],"state":"open","locked":false,"assignee":{"login":"myordanov","id":9948976,"avatar_url":"https://avatars2.githubusercontent.com/u/9948976?v=4","gravatar_id":"","url":"https://api.github.com/users/myordanov","html_url":"https://github.com/myordanov","followers_url":"https://api.github.com/users/myordanov/followers","following_url":"https://api.github.com/users/myordanov/following{/other_user}","gists_url":"https://api.github.com/users/myordanov/gists{/gist_id}","starred_url":"https://api.github.com/users/myordanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myordanov/subscriptions","organizations_url":"https://api.github.com/users/myordanov/orgs","repos_url":"https://api.github.com/users/myordanov/repos","events_url":"https://api.github.com/users/myordanov/events{/privacy}","received_events_url":"https://api.github.com/users/myordanov/received_events","type":"User","site_admin":false},"assignees":[{"login":"myordanov","id":9948976,"avatar_url":"https://avatars2.githubusercontent.com/u/9948976?v=4","gravatar_id":"","url":"https://api.github.com/users/myordanov","html_url":"https://github.com/myordanov","followers_url":"https://api.github.com/users/myordanov/followers","following_url":"https://api.github.com/users/myordanov/following{/other_user}","gists_url":"https://api.github.com/users/myordanov/gists{/gist_id}","starred_url":"https://api.github.com/users/myordanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myordanov/subscriptions","organizations_url":"https://api.github.com/users/myordanov/orgs","repos_url":"https://api.github.com/users/myordanov/repos","events_url":"https://api.github.com/users/myordanov/events{/privacy}","received_events_url":"https://api.github.com/users/myordanov/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-12-13T15:19:46Z","updated_at":"2017-12-19T08:35:42Z","closed_at":null,"author_association":"NONE","body":"OpenUI5 version:\r\nDetected in 1.48, but presumably in all versions since 1.44\r\n\r\nBrowser/version (+device/version):\r\nAll browsers and devices\r\n\r\nURL (minimal example if possible):\r\nhttps://embed.plnkr.co/bCOxJgLiQ6YRgKjhMsdq/\r\n\r\nSteps to reproduce the problem:\r\nIf you create hierachical json model with arrays\r\n```\r\nnew JSONModel([ {key:\"node1\", text:\"bla\", children:[...]},\r\n                       {key:\"node2\", text:\"moo\", children:[...]} ]\r\n```\r\n\r\nand you assign this to a Tree:\r\n`items:{path:'/', parameters{ arrayName:['children']} }\r\n`\r\nFiltering won't work anymore.\r\n\r\nThe reason fir this lies in the ClientTreeBinding \r\nmethod getNodeContexts\r\n\r\n![image](https://user-images.githubusercontent.com/18117870/33946025-f5c9769e-e020-11e7-8d7c-90b086f76d61.png)\r\n\r\nIf your node is an array \"aChildArray = oNode[sArrayName];\" will not work.\r\nthis assumes that your model is a hierarchical object, instead of an array.\r\n\r\nif however you could add \r\n```\r\nif(oNode instanceof Array){\r\n  oNode.forEach(function(oItem){\r\n  aChildArray = oItem[sArrayName];\r\n  ...\r\n})\r\n```\r\n\r\nThan filtering would also work on Array based json models."},"comment":{"url":"https://api.github.com/repos/SAP/openui5/issues/comments/352674925","html_url":"https://github.com/SAP/openui5/issues/1822#issuecomment-352674925","issue_url":"https://api.github.com/repos/SAP/openui5/issues/1822","id":352674925,"user":{"login":"myordanov","id":9948976,"avatar_url":"https://avatars2.githubusercontent.com/u/9948976?v=4","gravatar_id":"","url":"https://api.github.com/users/myordanov","html_url":"https://github.com/myordanov","followers_url":"https://api.github.com/users/myordanov/followers","following_url":"https://api.github.com/users/myordanov/following{/other_user}","gists_url":"https://api.github.com/users/myordanov/gists{/gist_id}","starred_url":"https://api.github.com/users/myordanov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myordanov/subscriptions","organizations_url":"https://api.github.com/users/myordanov/orgs","repos_url":"https://api.github.com/users/myordanov/repos","events_url":"https://api.github.com/users/myordanov/events{/privacy}","received_events_url":"https://api.github.com/users/myordanov/received_events","type":"User","site_admin":false},"created_at":"2017-12-19T08:35:42Z","updated_at":"2017-12-19T08:35:42Z","author_association":"CONTRIBUTOR","body":"Hi FiddleBe,\r\nyour findings have been forwarded to the responsible dev team with incident 1780511277.\r\n\r\nRegards, Mihail."}}
{"actor":{"display_login":"myordanov"}}