{"action":"created","issue":{"url":"https://api.github.com/repos/moroshko/react-autosuggest/issues/218","repository_url":"https://api.github.com/repos/moroshko/react-autosuggest","labels_url":"https://api.github.com/repos/moroshko/react-autosuggest/issues/218/labels{/name}","comments_url":"https://api.github.com/repos/moroshko/react-autosuggest/issues/218/comments","events_url":"https://api.github.com/repos/moroshko/react-autosuggest/issues/218/events","html_url":"https://github.com/moroshko/react-autosuggest/issues/218","id":171074591,"number":218,"title":"getSectionSuggestions passed undefined section param","user":{"login":"ZebraFlesh","id":10542617,"avatar_url":"https://avatars.githubusercontent.com/u/10542617?v=3","gravatar_id":"","url":"https://api.github.com/users/ZebraFlesh","html_url":"https://github.com/ZebraFlesh","followers_url":"https://api.github.com/users/ZebraFlesh/followers","following_url":"https://api.github.com/users/ZebraFlesh/following{/other_user}","gists_url":"https://api.github.com/users/ZebraFlesh/gists{/gist_id}","starred_url":"https://api.github.com/users/ZebraFlesh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZebraFlesh/subscriptions","organizations_url":"https://api.github.com/users/ZebraFlesh/orgs","repos_url":"https://api.github.com/users/ZebraFlesh/repos","events_url":"https://api.github.com/users/ZebraFlesh/events{/privacy}","received_events_url":"https://api.github.com/users/ZebraFlesh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-14T19:35:45Z","updated_at":"2016-09-03T11:08:05Z","closed_at":null,"body":"It seems that in some asynchronous scenarios, the `getSectionSuggestions` function gets passed a section parameter that is undefined.  The issue seems to only present itself when you asynchronously update the suggestions from the `onChange` handler. One work around appears to be asynchronously updating the suggestions from the `onSuggestionsUpdateRequested` function.\r\n\r\nCodePen showing onChange failure: http://codepen.io/anon/pen/VjgXQA?editors=0010#0\r\n* using the DownArrow key to loop through the list, it typically fails when the focus cycles back around to the front of the list\r\n\r\nCodePen showing work around via onSuggestionsUpdateRequested: http://codepen.io/anon/pen/PzVRZy?editors=0010#0\r\n* you can hold down the DownArrow key all day without issue\r\n\r\nI have absolutely no idea why this work around works, but I haven't dug into the AutoWhatever code. I should also say that in my own application, the failure scenario is slightly different: I get a null section right away when using the DownArrow key -- I don't need to loop through the list. Possibly it's because I'm doing additional things that change the behavior, but I figured I would mention it.\r\n\r\nI'm seeing this behavior in react-autosuggest 3.9.0 as well as using the CodePen samples (which I assume using the latest release); both scenarios use React 15. I'm using Chrome 52 on both Mac and Windows; same results."},"comment":{"url":"https://api.github.com/repos/moroshko/react-autosuggest/issues/comments/244540542","html_url":"https://github.com/moroshko/react-autosuggest/issues/218#issuecomment-244540542","issue_url":"https://api.github.com/repos/moroshko/react-autosuggest/issues/218","id":244540542,"user":{"login":"moroshko","id":259753,"avatar_url":"https://avatars.githubusercontent.com/u/259753?v=3","gravatar_id":"","url":"https://api.github.com/users/moroshko","html_url":"https://github.com/moroshko","followers_url":"https://api.github.com/users/moroshko/followers","following_url":"https://api.github.com/users/moroshko/following{/other_user}","gists_url":"https://api.github.com/users/moroshko/gists{/gist_id}","starred_url":"https://api.github.com/users/moroshko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moroshko/subscriptions","organizations_url":"https://api.github.com/users/moroshko/orgs","repos_url":"https://api.github.com/users/moroshko/repos","events_url":"https://api.github.com/users/moroshko/events{/privacy}","received_events_url":"https://api.github.com/users/moroshko/received_events","type":"User","site_admin":false},"created_at":"2016-09-03T11:08:05Z","updated_at":"2016-09-03T11:08:05Z","body":"@ZebraFlesh Could you please check if the issue still exists in v6.0.3, and if yes, update the issue (and the Codepen) accordingly? (`onSuggestionsUpdateRequested` was replaced with `onSuggestionsFetchRequested`)"}}
{"actor":{"display_login":"moroshko"}}