mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-26 12:00:03 +00:00
Merge pull request #16211 from darkliahos/master
Data Params declared as select2 option rather than string
This commit is contained in:
2
types/select2/index.d.ts
vendored
2
types/select2/index.d.ts
vendored
@@ -26,7 +26,7 @@ interface Select2AjaxOptions {
|
||||
dataType?: string;
|
||||
delay?: number;
|
||||
cache?: boolean;
|
||||
data?: (term: string, page: number, context: any) => any;
|
||||
data?: (params: Select2QueryOptions, page: number, context: any) => any;
|
||||
results?: (term: any, page: number, context: any) => any;
|
||||
processResults?:(data: any, params: any) => any;
|
||||
}
|
||||
|
||||
@@ -58,9 +58,9 @@ $("#e6").select2({
|
||||
url: "http://api.rottentomatoes.com/api/public/v1.0/movies.json",
|
||||
dataType: 'jsonp',
|
||||
cache: false,
|
||||
data: function (term, page) {
|
||||
data: function (params, page) {
|
||||
return {
|
||||
q: term,
|
||||
q: params.term,
|
||||
page_limit: 10,
|
||||
apikey: "ju6z9mjyajq2djue3gbvv26t"
|
||||
};
|
||||
@@ -79,9 +79,9 @@ $("#e6").select2({
|
||||
ajax: {
|
||||
url: () => { return "http://api.rottentomatoes.com/api/public/v1.0/movies.json"; },
|
||||
dataType: 'jsonp',
|
||||
data: function (term, page) {
|
||||
data: function (params, page) {
|
||||
return {
|
||||
q: term,
|
||||
q: params.term,
|
||||
page_limit: 10,
|
||||
apikey: "ju6z9mjyajq2djue3gbvv26t"
|
||||
};
|
||||
@@ -101,9 +101,9 @@ $("#e7").select2({
|
||||
url: "http://api.rottentomatoes.com/api/public/v1.0/movies.json",
|
||||
dataType: 'jsonp',
|
||||
delay: 100,
|
||||
data: function (term, page) {
|
||||
data: function (params, page) {
|
||||
return {
|
||||
q: term,
|
||||
q: params.term,
|
||||
page_limit: 10,
|
||||
page: page,
|
||||
apikey: "ju6z9mjyajq2djue3gbvv26t"
|
||||
|
||||
Reference in New Issue
Block a user