react-custom-scrollbars
react-custom-scrollbars copied to clipboard
Place absolute position element outside of scroll area
I would like to have an element that is under the scrollbars element but rendered outside of the scroll area.
const containerStyle = {
position: "relative";
};
const labelStyle = {
position: "absolute",
left: 0,
transform: "translateX(-100%)",
backgroundColor: "red",
};
return (
<div style={constainerStyle}>
<Scrollbars>
<div style={labelStyle}>Labelt</div>
</Scrollbars>
</div>
);
This doesn't work because scrollbars component has an absolute position as well. Is there a way to get around this?
I've the same requirement. Is there any possible solution?