Allow showing error without field focusing.
This commit is contained in:
parent
ba1c7d8d31
commit
84d68e48c0
2 changed files with 6 additions and 1 deletions
|
|
@ -3506,12 +3506,16 @@ void InputField::setEditLinkCallback(
|
|||
}
|
||||
|
||||
void InputField::showError() {
|
||||
setErrorShown(true);
|
||||
showErrorNoFocus();
|
||||
if (!hasFocus()) {
|
||||
_inner->setFocus();
|
||||
}
|
||||
}
|
||||
|
||||
void InputField::showErrorNoFocus() {
|
||||
setErrorShown(true);
|
||||
}
|
||||
|
||||
void InputField::setErrorShown(bool error) {
|
||||
if (_error != error) {
|
||||
_error = error;
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ public:
|
|||
const TextWithTags &value = TextWithTags());
|
||||
|
||||
void showError();
|
||||
void showErrorNoFocus();
|
||||
|
||||
void setMaxLength(int maxLength);
|
||||
void setMinHeight(int minHeight);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue