Full width dropdown popup
pmendelski opened this issue · 4 comments
pmendelski commented
Hi, is there an easy way to make dropdown popup full width?
To be exact I would like to add rule width: 100%
to popup--jss-0-5
class but I know it's a bad idea to add css rules to a generated class name.
pmendelski commented
I hacked it with:
const onRenderList = (className, style = {}, ...args) =>
Dropdown.defaultProps.onRenderList(className, { ...style, width: '100%' }, ...args);
...but it is far from perfection ;)
alexkuz commented
@mendlik Dropdown
is now configurable via theme
prop, it goes like this:
{
inputEnhancementsPopup: ({ style }) => ({
style: {
...style,
width: '100%'
}
})
}
Sorry my answer took so long :)
pmendelski commented
Thanks
Ivan-Feofanov commented
Can you pass the example for Combobox?
ok, i find how:
<Combobox
theme={{
inputEnhancementsPopup: ({ style }) => ({
style: {
...style,
width: '100%'
}
})
}}
/>