-
Notifications
You must be signed in to change notification settings - Fork 11
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
Deprecate the Input
component usage in AuInput
#250
Comments
might make (more) sense to provide a separate AuNativeInput component and deprecate the AuInput component? |
@nvdk It's an option, but it will have the same end-result as the other options but with a longer name 😄. Any reason why you prefer that route? |
I think it'll be easier to spot what type of input you're using in the app itself. I image a lot of apps will have mixed usage for a while. |
I assume it also makes deprecation checks a bit easier in appuniversum itself, though that was less of concern for me |
Yes, that's true, but the Anyway, I prefer to keep the |
Hit this again today, just to notify that it's still a desired change |
@abeforgit Any preference on one of the implementation options? 😄 |
agree that AuNativeInput is a clumsy name for what should be the only version of the component but its a small preference |
I went with option 2: #429 |
AuInput
is one of the last components that still usesInput
's 2-way-binding internally. This has the downside that it's not suitable for all use-cases and why some apps have to resort to using native inputs with css classes instead.It would be better to stop using
Input
and let consumers update the value with a change handler. The preference is to do this with the{{on}}
modifier instead of a custom@onChange
action since you have more flexibility over the used event (with the downside that the value needs to be read from the event object).Since this will have a major impact on all apps we can't expect them to change it all at once so a build-time only flag isn't a good option here. We do need a way to detect when the user wants the native element instead of the 2-way-bound
Input
.Some options:
@useNativeElement
argument (or similar) which we can use to swap out the implementation.@value
and push users to the attribute instead? in that case it makes sense to also deprecate some of the otherInput
arguments (@type
,@id
) and let users pass these in as attributes as well.AuInput
component and create a newAuNativeInput
component insteadThe text was updated successfully, but these errors were encountered: