mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 22:36:24 +00:00
feat(StatusInput): introduce reset
API
This can be used to reset text, error message and validity state of inputs
This commit is contained in:
parent
56212c547a
commit
ada657fab6
@ -38,6 +38,13 @@ Item {
|
||||
|
||||
property var errors: ({})
|
||||
|
||||
function reset() {
|
||||
statusBaseInput.valid = false
|
||||
statusBaseInput.pristine = true
|
||||
statusBaseInput.text = ""
|
||||
errorMessage = ""
|
||||
}
|
||||
|
||||
function validate() {
|
||||
if (!statusBaseInput.dirty && validationMode === StatusInput.ValidationMode.OnlyWhenDirty) {
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user