{"action":"closed","issue":{"url":"https://api.github.com/repos/rkit/react-select2-wrapper/issues/28","repository_url":"https://api.github.com/repos/rkit/react-select2-wrapper","labels_url":"https://api.github.com/repos/rkit/react-select2-wrapper/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/rkit/react-select2-wrapper/issues/28/comments","events_url":"https://api.github.com/repos/rkit/react-select2-wrapper/issues/28/events","html_url":"https://github.com/rkit/react-select2-wrapper/issues/28","id":145156292,"number":28,"title":"How to set the value  if use the ajax to get options ","user":{"login":"YantzWan","id":15907748,"avatar_url":"https://avatars.githubusercontent.com/u/15907748?v=3","gravatar_id":"","url":"https://api.github.com/users/YantzWan","html_url":"https://github.com/YantzWan","followers_url":"https://api.github.com/users/YantzWan/followers","following_url":"https://api.github.com/users/YantzWan/following{/other_user}","gists_url":"https://api.github.com/users/YantzWan/gists{/gist_id}","starred_url":"https://api.github.com/users/YantzWan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YantzWan/subscriptions","organizations_url":"https://api.github.com/users/YantzWan/orgs","repos_url":"https://api.github.com/users/YantzWan/repos","events_url":"https://api.github.com/users/YantzWan/events{/privacy}","received_events_url":"https://api.github.com/users/YantzWan/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-01T11:35:33Z","updated_at":"2016-06-17T04:55:11Z","closed_at":"2016-06-17T04:55:11Z","body":"I'd like to set an initial value for the select2 component\r\n\r\n```\r\n  var _options =    {\r\n      placeholder: '',\r\n      allowClear: true,\r\n      dropdownAutoWidth:true,\r\n      templateResult:this.templateResult,\r\n      sorter:this.sorter,\r\n      ajax:{\r\n        url: \"/value/options.json\",\r\n        dataType: 'json', \r\n        delay: 250, \r\n        data: function (params) {\r\n         return { \r\n           q:params.q\r\n           page: params.page };\r\n        }\r\n      }\r\n    }\r\n\r\n return (<Select2 key={'select-'+attr.attr_id.toString()} \r\n        onChange = {this.cbChange}\r\n        value = {_vsc}\r\n        options={ _options}/>\r\n        )\r\n\r\n```\r\nIt seems this don't work"}}
{"actor":{"display_login":"rkit"}}