fix(Nc*Field): do not pass all props to InputField BY filtering $props#4666
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.
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.
helperText removed, because it is exactly the same as in NcInputField and already defined
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Grigorii K. Shartsev <[email protected]>
Signed-off-by: Grigorii K. Shartsev <[email protected]>
94968e5 to
a3f48e3
Compare
susnux
left a comment
There was a problem hiding this comment.
Makes sense, even if I think the other PR is cleaner 😞
Clean, fast, without any auto-complete in IDE :( |
☑️ Resolves
HTML Validation issue.
Currently
NcTextFieldpasses both$attrsand$propsto theNcInputField.While passing
$attrsmakes sense, passing$propsis valid only when both components have exactly the same props. But they don't.NcTextFieldhas its own proptrailingButtonIconand may have more props in the future.Proposal: same as
NcSelect.Filter props to proxy only original
NcInputFieldprops.Alternative solution: do not use props for proxying.
See: #4665
🖼️ Screenshots
trailingbuttoniconis not a valid<input>attribute.🏁 Checklist