2
0
mirror of synced 2025-02-20 10:28:23 +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:
Pascal Precht 2021-09-14 13:37:09 +02:00 committed by Eric Mastro
parent 6e8a36be86
commit 4b9d11d1d4
No known key found for this signature in database
GPG Key ID: 141E3048D95A4E63

View File

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