{"action":"closed","issue":{"url":"https://api.github.com/repos/algolia/instantsearch.js/issues/2195","repository_url":"https://api.github.com/repos/algolia/instantsearch.js","labels_url":"https://api.github.com/repos/algolia/instantsearch.js/issues/2195/labels{/name}","comments_url":"https://api.github.com/repos/algolia/instantsearch.js/issues/2195/comments","events_url":"https://api.github.com/repos/algolia/instantsearch.js/issues/2195/events","html_url":"https://github.com/algolia/instantsearch.js/issues/2195","id":236159432,"number":2195,"title":"InfiniteHits continues to add hits when updating numeric refinement list","user":{"login":"bobylito","id":393765,"avatar_url":"https://avatars0.githubusercontent.com/u/393765?v=3","gravatar_id":"","url":"https://api.github.com/users/bobylito","html_url":"https://github.com/bobylito","followers_url":"https://api.github.com/users/bobylito/followers","following_url":"https://api.github.com/users/bobylito/following{/other_user}","gists_url":"https://api.github.com/users/bobylito/gists{/gist_id}","starred_url":"https://api.github.com/users/bobylito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobylito/subscriptions","organizations_url":"https://api.github.com/users/bobylito/orgs","repos_url":"https://api.github.com/users/bobylito/repos","events_url":"https://api.github.com/users/bobylito/events{/privacy}","received_events_url":"https://api.github.com/users/bobylito/received_events","type":"User","site_admin":false},"labels":[{"id":575510002,"url":"https://api.github.com/repos/algolia/instantsearch.js/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":{"login":"iam4x","id":893837,"avatar_url":"https://avatars1.githubusercontent.com/u/893837?v=3","gravatar_id":"","url":"https://api.github.com/users/iam4x","html_url":"https://github.com/iam4x","followers_url":"https://api.github.com/users/iam4x/followers","following_url":"https://api.github.com/users/iam4x/following{/other_user}","gists_url":"https://api.github.com/users/iam4x/gists{/gist_id}","starred_url":"https://api.github.com/users/iam4x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iam4x/subscriptions","organizations_url":"https://api.github.com/users/iam4x/orgs","repos_url":"https://api.github.com/users/iam4x/repos","events_url":"https://api.github.com/users/iam4x/events{/privacy}","received_events_url":"https://api.github.com/users/iam4x/received_events","type":"User","site_admin":false},"assignees":[{"login":"iam4x","id":893837,"avatar_url":"https://avatars1.githubusercontent.com/u/893837?v=3","gravatar_id":"","url":"https://api.github.com/users/iam4x","html_url":"https://github.com/iam4x","followers_url":"https://api.github.com/users/iam4x/followers","following_url":"https://api.github.com/users/iam4x/following{/other_user}","gists_url":"https://api.github.com/users/iam4x/gists{/gist_id}","starred_url":"https://api.github.com/users/iam4x/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iam4x/subscriptions","organizations_url":"https://api.github.com/users/iam4x/orgs","repos_url":"https://api.github.com/users/iam4x/repos","events_url":"https://api.github.com/users/iam4x/events{/privacy}","received_events_url":"https://api.github.com/users/iam4x/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-06-15T11:31:43Z","updated_at":"2017-06-20T23:21:03Z","closed_at":"2017-06-20T23:21:03Z","body":"From SO, here is the content of the message:\r\n\r\n----\r\n\r\nCurrently using the infinite search method that Algolia supplies through their instantSearch.js.\r\n\r\nThe following scenario is happening:\r\n\r\n 1. Search for an item\r\n 2. Refine the list\r\n 3. Load more pages up to page 5\r\n 4. Scroll back to the top and change refinement\r\n 5. Nothing happens\r\n\r\nBy the looks of it - it's appending the results of the new refinement to the results that are already there. I'm looking to make it resent the results, not sure if this is a bug with instant search itself?\r\n\r\n```js\r\n       search.addWidget(\r\n          instantsearch.widgets.numericRefinementList({\r\n            container: '#price',\r\n            attributeName: 'salePrice',\r\n            options: [\r\n              {name: 'All'},\r\n              {end: 20, name: 'less than 20'},\r\n              {end: 50, name: 'less than 50'},\r\n              {start: 50, end: 100, name: 'between 50 and 100'},\r\n              {start: 100, end: 300, name: 'Expensive'},\r\n              {start: 300, name: 'Very Expensive'}\r\n            ],\r\n            templates: {\r\n              header: 'Price'\r\n            }\r\n          })\r\n        );\r\n```\r\nAnd the infinite search code:\r\n\r\n```\r\n    search.addWidget(\r\n      instantsearch.widgets.infiniteHits({\r\n        container: '#infinite-hits-container',\r\n        templates: {\r\n          empty: 'No results',\r\n          item: hitTemplate\r\n        },\r\n        hitsPerPage: 3\r\n      })\r\n    );\r\n```\r\n\r\n ---- \r\n\r\nI was able to reproduce the issue in this jsFiddle: https://jsfiddle.net/bobylito/cbj43209/"}}
{"actor":{"display_login":"iam4x"}}