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

AjaxOptions

data class AjaxOptions

Data class for AJAX options.

Constructors

<init>

AjaxOptions(url: String? = null, preprocessData: ((dynamic) -> dynamic)? = null, beforeSend: ((JQueryXHR, dynamic) -> 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, preserveSelected: Boolean = false, processData: Boolean = false)

Properties

beforeSend

val beforeSend: ((JQueryXHR, dynamic) -> dynamic)?

JQuery ajax.beforeSend option

cache

val cache: Boolean

AjaxBootstrapSelect cache option

clearOnEmpty

val clearOnEmpty: Boolean

AjaxBootstrapSelect clearOnEmpty option

clearOnError

val clearOnError: Boolean

AjaxBootstrapSelect clearOnError option

data

val data: dynamic

JQuery ajax.data option

dataType

val dataType: DataType

emptyRequest

val emptyRequest: Boolean

AjaxBootstrapSelect emptyRequest option

httpType

val httpType: HttpType

JQuery ajax.type option

minLength

val minLength: Int

AjaxBootstrapSelect minLength option

preprocessData

val preprocessData: ((dynamic) -> dynamic)?

AjaxBootstrapSelect preprocessOption option

preserveSelected

val preserveSelected: Boolean

processData

val processData: Boolean

requestDelay

val requestDelay: Int

AjaxBootstrapSelect requestDelay option

restoreOnError

val restoreOnError: Boolean

AjaxBootstrapSelect restoreOnError option

url

val url: String?

the url address

Extension Functions

createInstance

fun <T> Any?.createInstance(vararg args: dynamic): T

Helper function for creating JavaScript objects from dynamic constructors.

toJs

fun AjaxOptions.toJs(emptyOption: Boolean): dynamic

Convert AjaxOptions to JavaScript JSON object.