You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe. form-field in material doesn't support passing params into the suffix/prefix template. at least it should pass the formControl.
Why? Because sometimes the select can have suffix with an action. not just display template. for example to clear the value of the formControl.
It's simple select and the button should display only when the value exists. and if so you can clear the value (x).
Describe the solution you'd like
The solution is can be very simple, just add ngTemplateOutletContext or any similar directive to pass the formControl into the template.
Is your feature request related to a problem? Please describe.
form-field
in material doesn't support passing params into the suffix/prefix template. at least it should pass theformControl
.Why? Because sometimes the
select
can have suffix with an action. not just display template. for example to clear the value of theformControl
.Consider this code:
It's simple
select
and the button should display only when the value exists. and if so you can clear the value (x).Describe the solution you'd like
The solution is can be very simple, just add
ngTemplateOutletContext
or any similar directive to pass theformControl
into the template.Additional context
Need simple change here: https://github.com/ngx-formly/ngx-formly/blob/main/src/ui/material/form-field/src/form-field.wrapper.ts#L68.
I can send a PR if you want.
The text was updated successfully, but these errors were encountered: