Added a field to specify whether to show keyboard when customTextFiel… (#192)
This commit is contained in:
committed by
GitHub
parent
7d2bb9cd35
commit
e50a3f3b44
@@ -23,7 +23,8 @@ data class CustomTextFieldProperty(
|
||||
var cursorColor: String? = null,
|
||||
var colors: OutlinedTextFieldColors? = null,
|
||||
var arrangementData: ArrangementData? = null,
|
||||
var invalidCharRegex: String? = null
|
||||
var invalidCharRegex: String? = null,
|
||||
var showKeyboardOnRender : Boolean? = null
|
||||
) : BaseProperty() {
|
||||
|
||||
override fun copyNonNullFrom(property: BaseProperty?) {
|
||||
@@ -48,6 +49,7 @@ data class CustomTextFieldProperty(
|
||||
customTextFieldProperty?.colors?.let { colors = it }
|
||||
customTextFieldProperty?.arrangementData?.let { arrangementData = it }
|
||||
customTextFieldProperty?.invalidCharRegex?.let { invalidCharRegex = it }
|
||||
customTextFieldProperty?.showKeyboardOnRender?.let { showKeyboardOnRender = it }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -275,6 +275,11 @@ class CustomTextFieldRenderer(
|
||||
}
|
||||
}
|
||||
}
|
||||
LaunchedEffect(key1 = Unit) {
|
||||
if (property.showKeyboardOnRender.orFalse()) {
|
||||
keyboardController?.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user