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
How to add a CSS class name to the options of type select in the formly v5 material form?
Description
Formly v5
Using angular material
Angular v7
I'm trying to add a classname to the options in the select drop down box. This classname is part of a security feature. When I add the classname through the className field of the fieldConfig, it applies it to the formly-field on a top level, which is fine. When the dropdown box is opened, the options are opened and in the html, it is opened in a separate container div(cdk-overlay-container in the image below) that is not part of the form. This means the security feature of the classname is not applied to the options. Ideally I'm looking for a way where the classname would be applied for the options too.
Can I achieve this using custom wrappers or create a custom type of select that can do this? Or is there a config field that I'm missing
The text was updated successfully, but these errors were encountered:
Question
How to add a CSS class name to the options of type select in the formly v5 material form?
Description
I'm trying to add a classname to the options in the select drop down box. This classname is part of a security feature. When I add the classname through the
className
field of the fieldConfig, it applies it to the formly-field on a top level, which is fine. When the dropdown box is opened, the options are opened and in the html, it is opened in a separate container div(cdk-overlay-container
in the image below) that is not part of the form. This means the security feature of the classname is not applied to the options. Ideally I'm looking for a way where the classname would be applied for the options too.Can I achieve this using custom wrappers or create a custom type of select that can do this? Or is there a config field that I'm missing
The text was updated successfully, but these errors were encountered: