I am trying to implement a custom Menu dropdown in column header, its not like header context menu. I want both context menu as well as this menu dropdown. The issue is that none of the menu dropdown implemented are working or rendering the items, especially the ones using portal. I have tried various libraries this is using react-select. I cannot use basic select since I need custom styling for the items.
I tried using both afterGetColHeaders
as well as
colHeaders={() => {
const str = renderToString(
<Dropdown/>
)
return str;
}}
export const colourOptions = [
{ value: 'ocean', label: 'Ocean', color: '#00B8D9', isFixed: true },
{ value: 'blue', label: 'Blue', color: '#0052CC', isDisabled: true },
{ value: 'purple', label: 'Purple', color: '#5243AA' },
];
export const Dropdown= () => (
<Select
className="basic-single"
classNamePrefix="select"
defaultValue={colourOptions[0]}
name="color"
options={colourOptions}
/>
);