{"action":"created","comment":{"url":"https://api.github.com/repos/algolia/vue-instantsearch/pulls/comments/212219093","pull_request_review_id":148801276,"id":212219093,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjIxOTA5Mw==","diff_hunk":"@@ -1,15 +1,20 @@\n <template>\n <div v-if=\"state\" :class=\"suit()\">\n-  <form :class=\"suit('form')\" @submit.prevent=\"refine()\">\n+  <slot\n+    :currentRefinements=\"this.state.start\"\n+    :refine=\"this.refine\"\n+  >\n+  <form :class=\"suit('form')\" @submit.prevent=\"refine(minInput, maxInput)\">\n     <label :class=\"suit('label')\">\n-      <input :class=\"[suit('input'), suit('input', 'min')]\" type=\"number\" ref=\"minInput\" :min=\"this.min\" :placeholder=\"this.min\"/>\n+      <input :class=\"[suit('input'), suit('input', 'min')]\" type=\"number\" :min=\"this.min\"  :placeholder=\"this.min\" :value=\"this.state.start && this.state.start[0]\" @change=\"minInput = $event.currentTarget.value\"/>\n     </label>\n     <span :class=\"suit('separator')\">to</span>\n     <label :class=\"suit('label')\">\n-      <input :class=\"[suit('input'), suit('input', 'max')]\" type=\"number\" ref=\"maxInput\" :max=\"this.max\" :placeholder=\"this.max\"/>\n+      <input :class=\"[suit('input'), suit('input', 'max')]\" type=\"number\" :max=\"this.max\"  :placeholder=\"this.max\" :value=\"this.state.start && this.state.start[1]\" @change=\"maxInput = $event.currentTarget.value\"/>\n     </label>\n     <button :class=\"suit('submit')\" type=\"submit\">Go</button>","path":"src/components/RangeInput.vue","position":18,"original_position":18,"commit_id":"7705737d5b4a1bfe8631f203b1e17699f41f674b","original_commit_id":"7705737d5b4a1bfe8631f203b1e17699f41f674b","user":{"login":"bobylito","id":393765,"node_id":"MDQ6VXNlcjM5Mzc2NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/393765?v=4","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},"body":"Do you want an empty slot for strictly adding a label or do you want a slot on `<label>`?","created_at":"2018-08-23T08:14:46Z","updated_at":"2018-08-23T08:14:46Z","html_url":"https://github.com/algolia/vue-instantsearch/pull/492#discussion_r212219093","pull_request_url":"https://api.github.com/repos/algolia/vue-instantsearch/pulls/492","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/algolia/vue-instantsearch/pulls/comments/212219093"},"html":{"href":"https://github.com/algolia/vue-instantsearch/pull/492#discussion_r212219093"},"pull_request":{"href":"https://api.github.com/repos/algolia/vue-instantsearch/pulls/492"}},"in_reply_to_id":211548744},"pull_request":{"url":"https://api.github.com/repos/algolia/vue-instantsearch/pulls/492","id":208883530,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4ODgzNTMw","html_url":"https://github.com/algolia/vue-instantsearch/pull/492","diff_url":"https://github.com/algolia/vue-instantsearch/pull/492.diff","patch_url":"https://github.com/algolia/vue-instantsearch/pull/492.patch","issue_url":"https://api.github.com/repos/algolia/vue-instantsearch/issues/492","number":492,"state":"open","locked":false,"title":"fix(RangeInput): provide default slot for customization","user":{"login":"bobylito","id":393765,"node_id":"MDQ6VXNlcjM5Mzc2NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/393765?v=4","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},"body":"This is a refactor of the previous implementation. It relies on the intermediate value in the component as the search experience of this widget is asynchronous (you have to validate the form to do a new search). One of the particularities is that I had to implement two update functions to ease the implementation on the slot side. Also the flow is a little bit special:\r\n - currentRefinements / state.start should always be used as the source of truth for re-rendering\r\n - the updateMin / updateMax will update a internal currentRefinements\r\n - the refine takes the internal currentRefinements and use it to update the state. At this point the stat.start will be in-sync with the UI\r\n\r\nLet me know if you have other questions.","created_at":"2018-08-16T14:42:55Z","updated_at":"2018-08-23T08:14:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"076d7b5833535e723b0663c87bc326532c99728b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/algolia/vue-instantsearch/pulls/492/commits","review_comments_url":"https://api.github.com/repos/algolia/vue-instantsearch/pulls/492/comments","review_comment_url":"https://api.github.com/repos/algolia/vue-instantsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/algolia/vue-instantsearch/issues/492/comments","statuses_url":"https://api.github.com/repos/algolia/vue-instantsearch/statuses/7705737d5b4a1bfe8631f203b1e17699f41f674b","head":{"label":"algolia:fix/rangeInput-review-samouss","ref":"fix/rangeInput-review-samouss","sha":"7705737d5b4a1bfe8631f203b1e17699f41f674b","user":{"login":"algolia","id":2034458,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMzQ0NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2034458?v=4","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"repo":{"id":70713628,"node_id":"MDEwOlJlcG9zaXRvcnk3MDcxMzYyOA==","name":"vue-instantsearch","full_name":"algolia/vue-instantsearch","owner":{"login":"algolia","id":2034458,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMzQ0NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2034458?v=4","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/algolia/vue-instantsearch","description":"👀  Algolia components for building search UIs with Vue.js","fork":false,"url":"https://api.github.com/repos/algolia/vue-instantsearch","forks_url":"https://api.github.com/repos/algolia/vue-instantsearch/forks","keys_url":"https://api.github.com/repos/algolia/vue-instantsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/algolia/vue-instantsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/algolia/vue-instantsearch/teams","hooks_url":"https://api.github.com/repos/algolia/vue-instantsearch/hooks","issue_events_url":"https://api.github.com/repos/algolia/vue-instantsearch/issues/events{/number}","events_url":"https://api.github.com/repos/algolia/vue-instantsearch/events","assignees_url":"https://api.github.com/repos/algolia/vue-instantsearch/assignees{/user}","branches_url":"https://api.github.com/repos/algolia/vue-instantsearch/branches{/branch}","tags_url":"https://api.github.com/repos/algolia/vue-instantsearch/tags","blobs_url":"https://api.github.com/repos/algolia/vue-instantsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/algolia/vue-instantsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/algolia/vue-instantsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/algolia/vue-instantsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/algolia/vue-instantsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/algolia/vue-instantsearch/languages","stargazers_url":"https://api.github.com/repos/algolia/vue-instantsearch/stargazers","contributors_url":"https://api.github.com/repos/algolia/vue-instantsearch/contributors","subscribers_url":"https://api.github.com/repos/algolia/vue-instantsearch/subscribers","subscription_url":"https://api.github.com/repos/algolia/vue-instantsearch/subscription","commits_url":"https://api.github.com/repos/algolia/vue-instantsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/algolia/vue-instantsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/algolia/vue-instantsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/algolia/vue-instantsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/algolia/vue-instantsearch/contents/{+path}","compare_url":"https://api.github.com/repos/algolia/vue-instantsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/algolia/vue-instantsearch/merges","archive_url":"https://api.github.com/repos/algolia/vue-instantsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/algolia/vue-instantsearch/downloads","issues_url":"https://api.github.com/repos/algolia/vue-instantsearch/issues{/number}","pulls_url":"https://api.github.com/repos/algolia/vue-instantsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/algolia/vue-instantsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/algolia/vue-instantsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/algolia/vue-instantsearch/labels{/name}","releases_url":"https://api.github.com/repos/algolia/vue-instantsearch/releases{/id}","deployments_url":"https://api.github.com/repos/algolia/vue-instantsearch/deployments","created_at":"2016-10-12T15:26:32Z","updated_at":"2018-08-19T05:35:38Z","pushed_at":"2018-08-22T13:44:41Z","git_url":"git://github.com/algolia/vue-instantsearch.git","ssh_url":"git@github.com:algolia/vue-instantsearch.git","clone_url":"https://github.com/algolia/vue-instantsearch.git","svn_url":"https://github.com/algolia/vue-instantsearch","homepage":"https://community.algolia.com/vue-instantsearch/","size":26103,"stargazers_count":411,"watchers_count":411,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":68,"mirror_url":null,"archived":false,"open_issues_count":44,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":68,"open_issues":44,"watchers":411,"default_branch":"master"}},"base":{"label":"algolia:feat/connectors","ref":"feat/connectors","sha":"2fcfca1a889cd6937e303134ad9e2fd56d575fa7","user":{"login":"algolia","id":2034458,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMzQ0NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2034458?v=4","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"repo":{"id":70713628,"node_id":"MDEwOlJlcG9zaXRvcnk3MDcxMzYyOA==","name":"vue-instantsearch","full_name":"algolia/vue-instantsearch","owner":{"login":"algolia","id":2034458,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMzQ0NTg=","avatar_url":"https://avatars0.githubusercontent.com/u/2034458?v=4","gravatar_id":"","url":"https://api.github.com/users/algolia","html_url":"https://github.com/algolia","followers_url":"https://api.github.com/users/algolia/followers","following_url":"https://api.github.com/users/algolia/following{/other_user}","gists_url":"https://api.github.com/users/algolia/gists{/gist_id}","starred_url":"https://api.github.com/users/algolia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/algolia/subscriptions","organizations_url":"https://api.github.com/users/algolia/orgs","repos_url":"https://api.github.com/users/algolia/repos","events_url":"https://api.github.com/users/algolia/events{/privacy}","received_events_url":"https://api.github.com/users/algolia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/algolia/vue-instantsearch","description":"👀  Algolia components for building search UIs with Vue.js","fork":false,"url":"https://api.github.com/repos/algolia/vue-instantsearch","forks_url":"https://api.github.com/repos/algolia/vue-instantsearch/forks","keys_url":"https://api.github.com/repos/algolia/vue-instantsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/algolia/vue-instantsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/algolia/vue-instantsearch/teams","hooks_url":"https://api.github.com/repos/algolia/vue-instantsearch/hooks","issue_events_url":"https://api.github.com/repos/algolia/vue-instantsearch/issues/events{/number}","events_url":"https://api.github.com/repos/algolia/vue-instantsearch/events","assignees_url":"https://api.github.com/repos/algolia/vue-instantsearch/assignees{/user}","branches_url":"https://api.github.com/repos/algolia/vue-instantsearch/branches{/branch}","tags_url":"https://api.github.com/repos/algolia/vue-instantsearch/tags","blobs_url":"https://api.github.com/repos/algolia/vue-instantsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/algolia/vue-instantsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/algolia/vue-instantsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/algolia/vue-instantsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/algolia/vue-instantsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/algolia/vue-instantsearch/languages","stargazers_url":"https://api.github.com/repos/algolia/vue-instantsearch/stargazers","contributors_url":"https://api.github.com/repos/algolia/vue-instantsearch/contributors","subscribers_url":"https://api.github.com/repos/algolia/vue-instantsearch/subscribers","subscription_url":"https://api.github.com/repos/algolia/vue-instantsearch/subscription","commits_url":"https://api.github.com/repos/algolia/vue-instantsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/algolia/vue-instantsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/algolia/vue-instantsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/algolia/vue-instantsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/algolia/vue-instantsearch/contents/{+path}","compare_url":"https://api.github.com/repos/algolia/vue-instantsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/algolia/vue-instantsearch/merges","archive_url":"https://api.github.com/repos/algolia/vue-instantsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/algolia/vue-instantsearch/downloads","issues_url":"https://api.github.com/repos/algolia/vue-instantsearch/issues{/number}","pulls_url":"https://api.github.com/repos/algolia/vue-instantsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/algolia/vue-instantsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/algolia/vue-instantsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/algolia/vue-instantsearch/labels{/name}","releases_url":"https://api.github.com/repos/algolia/vue-instantsearch/releases{/id}","deployments_url":"https://api.github.com/repos/algolia/vue-instantsearch/deployments","created_at":"2016-10-12T15:26:32Z","updated_at":"2018-08-19T05:35:38Z","pushed_at":"2018-08-22T13:44:41Z","git_url":"git://github.com/algolia/vue-instantsearch.git","ssh_url":"git@github.com:algolia/vue-instantsearch.git","clone_url":"https://github.com/algolia/vue-instantsearch.git","svn_url":"https://github.com/algolia/vue-instantsearch","homepage":"https://community.algolia.com/vue-instantsearch/","size":26103,"stargazers_count":411,"watchers_count":411,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":68,"mirror_url":null,"archived":false,"open_issues_count":44,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":68,"open_issues":44,"watchers":411,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/algolia/vue-instantsearch/pulls/492"},"html":{"href":"https://github.com/algolia/vue-instantsearch/pull/492"},"issue":{"href":"https://api.github.com/repos/algolia/vue-instantsearch/issues/492"},"comments":{"href":"https://api.github.com/repos/algolia/vue-instantsearch/issues/492/comments"},"review_comments":{"href":"https://api.github.com/repos/algolia/vue-instantsearch/pulls/492/comments"},"review_comment":{"href":"https://api.github.com/repos/algolia/vue-instantsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/algolia/vue-instantsearch/pulls/492/commits"},"statuses":{"href":"https://api.github.com/repos/algolia/vue-instantsearch/statuses/7705737d5b4a1bfe8631f203b1e17699f41f674b"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"bobylito"}}