-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE-677] Helpertext on combobox #723
Conversation
Codecov Report
@@ Coverage Diff @@
## master #723 +/- ##
==========================================
- Coverage 98.41% 98.37% -0.04%
==========================================
Files 44 48 +4
Lines 3273 3320 +47
Branches 970 980 +10
==========================================
+ Hits 3221 3266 +45
- Misses 52 54 +2
Continue to review full report at Codecov.
|
Does this functional tests? I wasn't sure |
src/combobox/example/index.ts
Outdated
valid: { valid: this._valid, message: 'Please enter value of state' }, | ||
helperText: 'helper text', | ||
onValidate: (valid: boolean | undefined, message: string) => { | ||
console.log('onValidate called', valid, message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this callback should be used to set valid
back on the widget
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does the onValidate
function do? I've been a bit confused there
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if the onValidate
function is something that will update the valid boolean based on the most up to date version of the dom shouldn't that be abstracted away so the user doesn't have to think about that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's a controlled component, the onValidate is a callback to inform the parent that the valid status has changed. It's upto the parent to set valid
back on the widget so that it can display the new status.
Looks good @sammenza , but I think you still need to remove the |
Alright cool, |
Type: feature
The following has been addressed in the PR:
Description:
{valid: boolean, message: string}
instead of a boolean.Contributes to #677