tomSelectRemoteRef

@Composable
fun <T : Any> IComponent.tomSelectRemoteRef(serviceManager: RpcServiceMgr<T>, function: suspend T.(String?, String?, String?) -> List<RemoteOption>, stateFunction: () -> String? = null, requestFilter: suspend RequestInit.() -> Unit? = null, openOnFocus: Boolean = false, preload: Boolean = false, options: List<StringPair>? = null, value: String? = null, emptyOption: Boolean = false, multiple: Boolean = false, maxOptions: Int? = null, tsOptions: TomSelectOptions? = null, tsCallbacks: TomSelectCallbacks? = null, tsRenders: TomSelectRenders? = null, name: String? = null, placeholder: String? = null, disabled: Boolean? = null, required: Boolean? = null, className: String? = null, id: String? = null, setup: @Composable ITomSelectRemote.() -> Unit = {}): TomSelectRemote<T>

Creates TomSelectRemote component with a remote data source, returning a reference.

Return

a TomSelectRemote component

Parameters

serviceManager

RPC service manager

function

RPC service method returning the list of options

stateFunction

a function to generate the state object passed with the remote request

requestFilter

a request filtering function

openOnFocus

determines if the options should be opened when the component gets focus

preload

preload all options from remote data source

options

a list of options (value to label pairs)

value

initial value

emptyOption

determines if an empty option is allowed

multiple

determines if multiple value selection is allowed

maxOptions

the maximum number of visible options

tsOptions

Tom Select options

tsCallbacks

Tom Select callbacks

tsRenders

Tom Select renders

name

the name of the select

placeholder

the placeholder for the select component

disabled

whether the select is disabled

required

whether the select is required

className

the CSS class name

id

the ID of the select component

setup

a function for setting up the component