Skip to content

@serenity-is/corelib / Select2AjaxOptions

Interface: Select2AjaxOptions

Defined in: src/ui/editors/select2.tsx:68

Options for ajax-based Select2 queries.

Extends

  • RequestInit

Properties

data()?

optional data: (p1, p2, p3) => any

Defined in: src/ui/editors/select2.tsx:76

Callback that builds the request data.

Parameters

p1

string

p2

number

p3

any

Returns

any


headers?

optional headers: Record<string, string>

Defined in: src/ui/editors/select2.tsx:70

Request headers.

Overrides

RequestInit.headers


params?

optional params: any

Defined in: src/ui/editors/select2.tsx:80

Additional request parameters.


quietMillis?

optional quietMillis: number

Defined in: src/ui/editors/select2.tsx:74

Delay in milliseconds before the ajax request.


results()?

optional results: (p1, p2, p3) => any

Defined in: src/ui/editors/select2.tsx:78

Callback that processes the response.

Parameters

p1

any

p2

number

p3

any

Returns

any


url?

optional url: string | (term, page, context) => string

Defined in: src/ui/editors/select2.tsx:72

The URL or a function returning it.

Methods

onError()?

optional onError(response, info?): boolean | void

Defined in: src/ui/editors/select2.tsx:84

Callback invoked when the ajax request fails.

Parameters

response

any

The error response payload.

info?

any

Additional error info.

Returns

boolean | void


onSuccess()?

optional onSuccess(response): void

Defined in: src/ui/editors/select2.tsx:87

Callback invoked when the ajax request succeeds.

Parameters

response

any

The success response payload.

Returns

void