kvision / pl.treksoft.kvision.form.select / AjaxOptions

AjaxOptions

data class AjaxOptions

Data class for AJAX options.

Constructors

<init>

AjaxOptions(url: String, preprocessData: (dynamic) -> dynamic, beforeSend: (JQueryXHR) -> dynamic = null, data: dynamic = null, httpType: HTTPTYPE = HTTPTYPE.GET, dataType: DATATYPE = DATATYPE.JSON, minLength: Int = 0, cache: Boolean = true, clearOnEmpty: Boolean = true, clearOnError: Boolean = true, emptyRequest: Boolean = false, requestDelay: Int = AJAX_REQUEST_DELAY, restoreOnError: Boolean = false)

Properties

beforeSend

val beforeSend: (JQueryXHR) -> dynamic

cache

val cache: Boolean

clearOnEmpty

val clearOnEmpty: Boolean

clearOnError

val clearOnError: Boolean

data

val data: dynamic

dataType

val dataType: DATATYPE

emptyRequest

val emptyRequest: Boolean

httpType

val httpType: HTTPTYPE

minLength

val minLength: Int

preprocessData

val preprocessData: (dynamic) -> dynamic

requestDelay

val requestDelay: Int

restoreOnError

val restoreOnError: Boolean

url

val url: String

Extension Functions

toJs

fun AjaxOptions.toJs(emptyOption: Boolean): dynamic

Convert AjaxOptions to JavaScript JSON object.