Added a field to specify whether to show keyboard when customTextFiel… (#192)

This commit is contained in:
Soumya Ranjan Patra
2023-09-25 19:04:57 +05:30
committed by GitHub
parent 7d2bb9cd35
commit e50a3f3b44
2 changed files with 8 additions and 1 deletions

View File

@@ -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 }
}
}

View File

@@ -275,6 +275,11 @@ class CustomTextFieldRenderer(
}
}
}
LaunchedEffect(key1 = Unit) {
if (property.showKeyboardOnRender.orFalse()) {
keyboardController?.show()
}
}
}
}