react-custom-scrollbars icon indicating copy to clipboard operation
react-custom-scrollbars copied to clipboard

Place absolute position element outside of scroll area

Open Haaxor1689 opened this issue 5 years ago • 1 comments

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?

Haaxor1689 avatar Oct 19 '19 11:10 Haaxor1689

I've the same requirement. Is there any possible solution?

knox31085 avatar Jul 09 '20 15:07 knox31085