Sharlaan / material-ui-superselectfield

multiselection autocomplete dropdown component for Material-UI
https://sharlaan.github.io/material-ui-superselectfield
MIT License
266 stars 92 forks source link

How to style the popover element? #139

Closed barrymichaeldoyle closed 6 years ago

barrymichaeldoyle commented 6 years ago

I'm working on a project where the application's base styles have a transition effect which is interfering with the superselectfield popover (I'm using a group select).

We're using styled components, it is possible to add a class to the root div of the popover?

Not sure how I can disable transitions across the entire element otherwise.

Sharlaan commented 6 years ago

Hello,

Indeed, you pointed me at this line showing the Popover's styles are not exposed, hence not customisable ... I can expose the Popover's className prop, but can you show a sample code showing how yours transitions are applied to SuperSelectField ? Maybe i can find a better suited solution ?

barrymichaeldoyle commented 6 years ago

I wrote that as work and now I'm home so I can't really show the code. But my solution to similar problems was to use a className. So if you could expose the Popover's className prop that would be life saving! :)

Sharlaan commented 6 years ago

Can you try with v1.8.7 ?

barrymichaeldoyle commented 6 years ago

Yeah it's good, thanks man :)

Sharlaan commented 6 years ago

I'm actually not sure it is working: for example i created a class popover { border: 1px solid red } and imported it into the component using SSF => the class didnot applied even though i retrieved it in Elements panels in DevTools...

barrymichaeldoyle commented 6 years ago

You're missing the . it should be .popover { border: 1px solid red; }

Sharlaan commented 6 years ago

rofl i feel noob ! thanks Barry it works ^^ Enjoy

barrymichaeldoyle commented 6 years ago

Happens to the best of us ;) Thanks for everything man :) Appreciate your hard work on this repo :D

barrymichaeldoyle commented 6 years ago

Could you add me as a collaborator on npmjs? My username is barrymichaeldoyle