Skip to content

Commit

Permalink
c:\OwnCloudDev10\GitHub\slickgrid-react\src\examples\slickgrid\jsonp.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding committed Dec 13, 2024
1 parent 4d35685 commit e47e7f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/examples/example04.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ export default class Example04 {
editorOptions: {
minLength: 3,
fetch: (searchText, updateCallback) => {
fetchJsonp<string[]>(`http://gd.geobytes.com/AutoCompleteCity?q=${searchText}`, { crossorigin: true })
fetchJsonp<string[]>(`http://gd.geobytes.com/AutoCompleteCity?q=${searchText}`)
.then((response) => response.json())
.then((json) => updateCallback(json))
.catch((ex) => console.log('invalid JSONP response', ex));
Expand Down Expand Up @@ -282,7 +282,7 @@ export default class Example04 {
filterOptions: {
minLength: 3,
fetch: (searchText, updateCallback) => {
fetchJsonp(`http://gd.geobytes.com/AutoCompleteCity?q=${searchText}`)
fetchJsonp<string[]>(`http://gd.geobytes.com/AutoCompleteCity?q=${searchText}`)
.then((response) => response.json())
.then((json) => updateCallback(json))
.catch((ex) => console.log('invalid JSONP response', ex));
Expand Down

0 comments on commit e47e7f0

Please sign in to comment.