FileSelectionBaseComponent

abstract class FileSelectionBaseComponent

This abstract class is the base configuration for file inputs. It has two specific implementations:

Both specific implementations only differ in their rendering implementation, but share the same configuration options, like creating a button which has the same options like a pushButton.

Much more important are the configuration functions. You can configure the following aspects:

This can be done within a functional expression that is the last parameter of the two files functions, called `build`. It offers an initialized instance of this FileSelectionBaseComponent class as receiver, so every mutating method can be called for configuring the desired state for rendering the button.

The following example shows the usage (SingleFileSelectionComponent):

file {
accept("application/pdf")
button({
background { color { info } }
}) {
icon { fromTheme { document } }
text("Accept only pdf files")
}
}

Constructors

FileSelectionBaseComponent
Link copied to clipboard
js
fun FileSelectionBaseComponent()

Types

Companion
Link copied to clipboard
js
object Companion

Functions

accept
Link copied to clipboard
js
fun accept(value: String)
fun accept(value: Flow<String>)
button
Link copied to clipboard
js
open fun button(styling: BasicParams.() -> Unit = {}, baseClass: StyleClass = StyleClass.None, id: String? = null, prefix: String = "file-button", build: PushButtonComponent.() -> Unit = {})
encoding
Link copied to clipboard
js
fun encoding(value: String)
equals
Link copied to clipboard
js
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
js
open fun hashCode(): Int
toString
Link copied to clipboard
js
open fun toString(): String

Properties

base64
Link copied to clipboard
js
val base64: FileReadingStrategy
fileReadingStrategy
Link copied to clipboard
plainText
Link copied to clipboard
js
val plainText: (String) -> FileReadingStrategy

Inheritors

SingleFileSelectionComponent
Link copied to clipboard
MultiFileSelectionComponent
Link copied to clipboard