{"action":"created","issue":{"url":"https://api.github.com/repos/mapzen/leaflet-geocoder/issues/133","repository_url":"https://api.github.com/repos/mapzen/leaflet-geocoder","labels_url":"https://api.github.com/repos/mapzen/leaflet-geocoder/issues/133/labels{/name}","comments_url":"https://api.github.com/repos/mapzen/leaflet-geocoder/issues/133/comments","events_url":"https://api.github.com/repos/mapzen/leaflet-geocoder/issues/133/events","html_url":"https://github.com/mapzen/leaflet-geocoder/pull/133","id":169470775,"number":133,"title":"added geocoder.resetInput() to \"methods\" in README","user":{"login":"Abbe98","id":2631719,"avatar_url":"https://avatars.githubusercontent.com/u/2631719?v=3","gravatar_id":"","url":"https://api.github.com/users/Abbe98","html_url":"https://github.com/Abbe98","followers_url":"https://api.github.com/users/Abbe98/followers","following_url":"https://api.github.com/users/Abbe98/following{/other_user}","gists_url":"https://api.github.com/users/Abbe98/gists{/gist_id}","starred_url":"https://api.github.com/users/Abbe98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abbe98/subscriptions","organizations_url":"https://api.github.com/users/Abbe98/orgs","repos_url":"https://api.github.com/users/Abbe98/repos","events_url":"https://api.github.com/users/Abbe98/events{/privacy}","received_events_url":"https://api.github.com/users/Abbe98/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-04T20:51:37Z","updated_at":"2016-08-07T08:41:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mapzen/leaflet-geocoder/pulls/133","html_url":"https://github.com/mapzen/leaflet-geocoder/pull/133","diff_url":"https://github.com/mapzen/leaflet-geocoder/pull/133.diff","patch_url":"https://github.com/mapzen/leaflet-geocoder/pull/133.patch"},"body":"No other of the mentioned method actually resets the input."},"comment":{"url":"https://api.github.com/repos/mapzen/leaflet-geocoder/issues/comments/238070903","html_url":"https://github.com/mapzen/leaflet-geocoder/pull/133#issuecomment-238070903","issue_url":"https://api.github.com/repos/mapzen/leaflet-geocoder/issues/133","id":238070903,"user":{"login":"Abbe98","id":2631719,"avatar_url":"https://avatars.githubusercontent.com/u/2631719?v=3","gravatar_id":"","url":"https://api.github.com/users/Abbe98","html_url":"https://github.com/Abbe98","followers_url":"https://api.github.com/users/Abbe98/followers","following_url":"https://api.github.com/users/Abbe98/following{/other_user}","gists_url":"https://api.github.com/users/Abbe98/gists{/gist_id}","starred_url":"https://api.github.com/users/Abbe98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Abbe98/subscriptions","organizations_url":"https://api.github.com/users/Abbe98/orgs","repos_url":"https://api.github.com/users/Abbe98/repos","events_url":"https://api.github.com/users/Abbe98/events{/privacy}","received_events_url":"https://api.github.com/users/Abbe98/received_events","type":"User","site_admin":false},"created_at":"2016-08-07T08:41:50Z","updated_at":"2016-08-07T08:41:50Z","body":"I'm using it to clear the input, and the result list when a user has\nselected a location so that the next time the geocoder is used the user can\nstart typing a new location without distraction(I'm also using it to\nactually close the geocoder).\n\n```\ngeocoder.on('select', function(e) {\n   map.setZoom(13);\n   geocoder.resetInput();\n});\n```\n\nA new `reset()` method would work in my case.\n\n2016-08-07 4:57 GMT+02:00 Lou Huang <notifications@github.com>:\n\n> Hi @Abbe98 <https://github.com/Abbe98>. Thanks for the PR! We didn't\n> document certain methods because they were not designed with public use in\n> mind (they can still change internally, for example). One of the side\n> effects of resetInput I'm worried about is that it also puts focus on the\n> input box, since it was designed to be called when a user clicks the reset\n> (X) button in preparation for typing a new search. If you use resetInput()\n> programmatically to reset the state of the geocoder, you might not be\n> expecting that to happen.\n>\n> Can you tell me more about your particular need to reset? Do you need to\n> clear only the input element, or do you also need to reset other aspects of\n> the geocoder (like the results list, for example)?\n>\n> Thinking ahead, I think a better way to support a generic reset is to\n> provide a new reset() method that is designed to be called\n> programmatically and will actually fully reset the geocoder to a brand new\n> state (while retaining current options). What do you think?\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/mapzen/leaflet-geocoder/pull/133#issuecomment-238060284>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/ACgoJ6q5pc9cQ-n0wF4Z51lcJjHwUNuLks5qdUmsgaJpZM4JdHEb>\n> .\n>\n"}}
{"actor":{"display_login":"Abbe98"}}