bindTo

fun bindTo(handlerName: String, userData: List<Any?>)(source)
fun bindTo(handlerName: String, vararg userData: Any?): ModalBuilder(source)

Binds the action to a @ModalHandler with its arguments.

Each @ModalInput must match a component's custom ID, alternatively, you can always retrieve input values from the event.

Parameters

handlerName

The name of the modal handler, which must be the same as your @ModalHandler

userData

The optional user data to be passed to the modal handler via @ModalData


fun bindTo(handler: suspend (ModalEvent) -> Unit)(source)

Binds the action to the closure.

Parameters

handler

The modal handler to run when the modal is used