selectRemoteRef

@Composable
fun <T : Any> IComponent.selectRemoteRef(serviceManager: RpcServiceMgr<T>, function: suspend T.(String?) -> List<SimpleRemoteOption>, stateFunction: () -> String? = null, requestFilter: suspend RequestInit.() -> Unit? = null, refreshOnFocus: Boolean = false, options: List<StringPair>? = null, value: String? = null, emptyOption: Boolean = false, multiple: Boolean = false, size: Int? = null, name: String? = null, placeholder: String? = null, disabled: Boolean? = null, required: Boolean? = null, className: String? = null, id: String? = null, setup: @Composable ISelect.() -> Unit = {}): Select

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

Return

a Select 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

refreshOnFocus

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

options

an initial list of options (value to label pairs)

value

initial value

multiple

determines if multiple value selection is allowed

size

the number of visible options

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