{"action":"created","issue":{"url":"https://api.github.com/repos/KleeGroup/focus-components/issues/1039","repository_url":"https://api.github.com/repos/KleeGroup/focus-components","labels_url":"https://api.github.com/repos/KleeGroup/focus-components/issues/1039/labels{/name}","comments_url":"https://api.github.com/repos/KleeGroup/focus-components/issues/1039/comments","events_url":"https://api.github.com/repos/KleeGroup/focus-components/issues/1039/events","html_url":"https://github.com/KleeGroup/focus-components/issues/1039","id":139304797,"number":1039,"title":"[AdvancedSearch] crash when typing a too restrictive criterion while a facet is selected","user":{"login":"Tsj-","id":6391835,"avatar_url":"https://avatars.githubusercontent.com/u/6391835?v=3","gravatar_id":"","url":"https://api.github.com/users/Tsj-","html_url":"https://github.com/Tsj-","followers_url":"https://api.github.com/users/Tsj-/followers","following_url":"https://api.github.com/users/Tsj-/following{/other_user}","gists_url":"https://api.github.com/users/Tsj-/gists{/gist_id}","starred_url":"https://api.github.com/users/Tsj-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tsj-/subscriptions","organizations_url":"https://api.github.com/users/Tsj-/orgs","repos_url":"https://api.github.com/users/Tsj-/repos","events_url":"https://api.github.com/users/Tsj-/events{/privacy}","received_events_url":"https://api.github.com/users/Tsj-/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-03-08T15:24:37Z","updated_at":"2016-03-08T15:32:17Z","closed_at":null,"body":"# Current behaviour\r\n\r\nIn the advanced search screen, I modify the search criteria while a facet is selected. If the result doesn't correspond with the selected facet, a error occured in the 'facet.js' saying the it can't find the property label of undefined.\r\n\r\n![before](https://cloud.githubusercontent.com/assets/6391835/13605523/3466b806-e548-11e5-9744-8d816250fbfb.PNG)\r\n\r\nHere I select the facet __Personnal Items__.\r\n\r\n![after](https://cloud.githubusercontent.com/assets/6391835/13605957/39b04d0c-e54a-11e5-91d9-0607dbfb5d30.PNG)\r\n\r\nThen I modify my criteria, searching for the name __cacahuete__, and the error occures.\r\n\r\nHere's the JSON returned by the server.\r\n```Javascript\r\n{\r\n   \"list\":[\r\n\r\n   ],\r\n   \"facets\":{\r\n      \"activitySector\":{\r\n\r\n      },\r\n      \"country\":{\r\n\r\n      },\r\n      \"groupBrandName\":{\r\n\r\n      }\r\n   },\r\n   \"totalCount\":0,\r\n   \"query\":{\r\n      \"facets\":[\r\n         {\r\n            \"key\":\"activitySector\",\r\n            \"value\":\"PERSONAL ITEMS\"\r\n         }\r\n      ],\r\n      \"criteria\":{\r\n         \"query\":\"cacahuete\",\r\n         \"filterQuery\":\"+(currencyCode:EUR _missing_:currencyCode)\",\r\n         \"scope\":\"Shop\"\r\n      },\r\n      \"group\":\"\",\r\n      \"sortDescending\":true,\r\n      \"skip\":0\r\n   }\r\n}\r\n```\r\n\r\n# Expected behaviour\r\nTwo behaviour can be expected. \r\nEither we consider facets like filters and then the result should show no result, but the selected facet is still active.\r\nEither the facet is considered as a restriction of the result, and depend on the criteria, and should be erased after the modification of the criteria.\r\n\r\n## Versions\r\n\r\nFocus-core: [0.12.4-rc2]\r\nFocus-components: [0.8.6-rc0]\r\n\r\n## N.B.\r\n\r\nThis problem have already been reported by @sgoretti \r\n"},"comment":{"url":"https://api.github.com/repos/KleeGroup/focus-components/issues/comments/193825240","html_url":"https://github.com/KleeGroup/focus-components/issues/1039#issuecomment-193825240","issue_url":"https://api.github.com/repos/KleeGroup/focus-components/issues/1039","id":193825240,"user":{"login":"sgoretti","id":14293391,"avatar_url":"https://avatars.githubusercontent.com/u/14293391?v=3","gravatar_id":"","url":"https://api.github.com/users/sgoretti","html_url":"https://github.com/sgoretti","followers_url":"https://api.github.com/users/sgoretti/followers","following_url":"https://api.github.com/users/sgoretti/following{/other_user}","gists_url":"https://api.github.com/users/sgoretti/gists{/gist_id}","starred_url":"https://api.github.com/users/sgoretti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgoretti/subscriptions","organizations_url":"https://api.github.com/users/sgoretti/orgs","repos_url":"https://api.github.com/users/sgoretti/repos","events_url":"https://api.github.com/users/sgoretti/events{/privacy}","received_events_url":"https://api.github.com/users/sgoretti/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T15:32:17Z","updated_at":"2016-03-08T15:32:17Z","body":":+1: \r\n\r\nI always +1 problems I reported before."}}