tomTypeaheadRemote

@Composable
fun <T : Any> IComponent.tomTypeaheadRemote(serviceManager: RpcServiceMgr<T>, function: suspend T.(String?, String?) -> List<String>, stateFunction: () -> String? = null, requestFilter: suspend RequestInit.() -> Unit? = null, options: List<String>? = null, value: String? = null, type: InputType = InputType.Text, tsCallbacks: TomSelectCallbacks? = null, name: String? = null, placeholder: String? = null, disabled: Boolean? = null, required: Boolean? = null, className: String? = null, id: String? = null, setup: @Composable ITomTypeahead.() -> Unit = {})

Creates TomTypeahead component with a remote data source.

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

options

a list of options

value

initial value

type

the type of the input

tsCallbacks

Tom Select callbacks

name

the name of the select

placeholder

the placeholder for the input 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