value in StandardInput is nullable

This commit is contained in:
InsanusMokrassar 2023-03-05 18:50:59 +06:00
parent 1eb14becde
commit 8178fa9d39

View File

@ -11,7 +11,7 @@ import org.w3c.dom.HTMLInputElement
@Composable @Composable
fun <T> StandardInput( fun <T> StandardInput(
type: InputType<T>, type: InputType<T>,
value: T, value: T? = null,
vararg modifiers: UIKitModifier, vararg modifiers: UIKitModifier,
disabled: Boolean = false, disabled: Boolean = false,
placeholder: String? = null, placeholder: String? = null,
@ -24,7 +24,7 @@ fun <T> StandardInput(
placeholder ?.let(::placeholder) placeholder ?.let(::placeholder)
value.let { value ?.let {
when (it) { when (it) {
is String -> value(it) is String -> value(it)
is Number -> value(it) is Number -> value(it)