-
Notifications
You must be signed in to change notification settings - Fork 184
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
Add support for adding prefix and suffix elements to input #598
Comments
So actually on this topic curious on to hear some thoughts on this, because I was already working on #591 so i created a brn-form-field/hlm-form-field directive to help support linking hint and errors to the input with id's. So I can had the prefix and suffix support to this but I guess does hlm/brn-form-field make it sound too much like you have to use a form with it? I mean material does it this way so maybe I'm just thinking too hard about it. So the solution would look like the below for an input that had everything single item, similar to mat-form-field structure at the end of the day.
So thoughts on this solution? Open to other ideas/suggestions as well! |
I'm fine with this being a child of the form field component, I guess really the main thing to decide is the scope of this. If it's part of form group, do we want it to work with all form controls, e.g. input, select, combobox etc.. or is this an input only thing? |
Yea thats a good point, I think maybe for simplicity we could do just do input and in that case it might make sense to keep it separate with the directive you suggested. Either that or we have to make this work with all the other form controls I suppose. I'm curious how material does this or does it just give a dev error that prefix/suffix cant be applied to certain controls? |
Looks like Material supports many different form controls with suffix and prefixes: https://stackblitz.com/edit/1kytuayg-cy7nx4gn?file=package.json Not sure how feasible this would be in our case though. |
Yea agree not sure if we would be able to do it well for all the other control types. I think scoping this to just the input would be a good place to start and we can keep it as a separate directive as you mentioned rather than with form field generically. Honestly I feel like this is the primary control people would expect this anyways but this is just my thoughts. It does suck a bit that the template would be a little more busy in this case but it might make the most sense for us. @goetzrobin @elite-benni Any thoughts on this? |
I think it would be nice to have it for other formcontrols as well. |
Which scope/s are relevant/related to the feature request?
input
Information
Similar to mat-form-field and their support for adding prefix and suffix elements to an input, it would be great if we could support something similar as well.
@ashley-hunter gave the below example of what we would need to support this.
Describe any alternatives/workarounds you're currently using
N/A
I would be willing to submit a PR to fix this issue
The text was updated successfully, but these errors were encountered: