I want to add css property if value is true. Example ->
menuList: (styles, { selectProps }) => ({
...styles,
padding: 0,
borderRadius: 3,
maxHeight: selectProps.setShortHeightDropDown && "120px"
}),
And this is work. Also i am try with
menuList: (styles, { selectProps }) => ({
...styles,
padding: 0,
borderRadius: 3,
maxHeight: selectProps.setShortHeightDropDown ? "120px" : "
}),
But in every time maxHeight proerty is setted.
What I need ?
If selectProps.setShortHeightDropDown === true set maxHeigh
If selectProps.setShortHeightDropDown === false not set maxHeigh
What i am try
menuList: (styles, { selectProps }) => ({
...styles,
padding: 0,
borderRadius: 3,
selectProps.setShortHeightDropDown ? maxHeight: selectProps.setShortHeightDropDown
"120px" : '
}),
But this is can't be written.
...(permission ? {pointerEvents: "none"} : undefined),see stackoverflow.com/questions/70954549/…