cisco-sbg-ui / atomic-react

https://atomic-react.security.cisco.com
2 stars 5 forks source link

Pass in custom class to ASelect with itemTemplate #1184

Closed vdineva closed 2 years ago

vdineva commented 2 years ago

Is your feature request related to a problem? Please describe. We have a few instances in our app (Device Insights) where we have <ASelect> with itemTemplate. See example usage @here

The problem is that while we can pass in a custom class to the <ASelect> element we can't really target the open menu with the items as they are not siblings of the <ASelect> - it's added as a descendent of the closest AMount element. If I wrap the ASelect in AMount - then I get into this issue.

Screen Shot 2022-03-28 at 14 23 55

Screen Shot 2022-03-28 at 14 23 46

Describe the solution you'd like A solution to the above problem would be to add the custom class from ASelect to the AMenu, e.g.

in atomic-react/framework/components/AMenu/AMenu.js Screen Shot 2022-03-28 at 14 45 53

so the consuming app can target this element in their css and not collide with SecureX's styling (ref: https://github.com/advthreat/GLaDOS/issues/3019)

vdineva commented 2 years ago

this is another related issue: https://github.com/advthreat/secure-client-forms/issues/902 Seems like in Secure Clients they need to target specific dropdown(s) - but inadvertently are affecting all dropdowns in SecureX and Device Insights. Going forward there will be more apps (e.g. User Insights) added so we need a way not to step on each other's toes