|
|
@ -16,7 +16,7 @@ Autocomplete select with search field. |
|
|
|
|
|
|
|
````jsx |
|
|
|
import { Input, Select, Button, Icon } from 'antd'; |
|
|
|
import jsonp from 'jsonp'; |
|
|
|
import jsonp from 'fetch-jsonp'; |
|
|
|
import querystring from 'querystring'; |
|
|
|
import classNames from 'classnames'; |
|
|
|
const Option = Select.Option; |
|
|
@ -36,7 +36,9 @@ function fetch(value, callback) { |
|
|
|
code: 'utf-8', |
|
|
|
q: value, |
|
|
|
}); |
|
|
|
jsonp(`https://suggest.taobao.com/sug?${str}`, (err, d) => { |
|
|
|
jsonp(`https://suggest.taobao.com/sug?${str}`) |
|
|
|
.then(response => response.json()) |
|
|
|
.then((d) => { |
|
|
|
if (currentValue === value) { |
|
|
|
const result = d.result; |
|
|
|
const data = []; |
|
|
|