-
Notifications
You must be signed in to change notification settings - Fork 93
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
fix(Nc*Field): do not pass all props to InputField BY filtering $props #4666
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
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.
makes sense
Thanks! Could you also have a look at this PR with an alternative |
5cd3e2f
to
94968e5
Compare
Although an alternative approach with a classic transparent wrapper approach (with proxying only Even with Waiting for Vue to add something for defining attrs types for component wrappers 😭 |
helperText: { | ||
type: String, | ||
default: '', |
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.
helperText
removed, because it is exactly the same as in NcInputField and already defined
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
94968e5
to
a3f48e3
Compare
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.
Makes sense, even if I think the other PR is cleaner 😞
Clean, fast, without any auto-complete in IDE :( |
☑️ Resolves
HTML Validation issue.
Currently
NcTextField
passes both$attrs
and$props
to theNcInputField
.While passing
$attrs
makes sense, passing$props
is valid only when both components have exactly the same props. But they don't.NcTextField
has its own proptrailingButtonIcon
and may have more props in the future.Proposal: same as
NcSelect
.Filter props to proxy only original
NcInputField
props.Alternative solution: do not use props for proxying.
See: #4665
🖼️ Screenshots
trailingbuttonicon
is not a valid<input>
attribute.🏁 Checklist