Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/components/Scrollable/Scrollable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,15 @@ export default class Scrollable extends React.PureComponent {
}

render() {
const {children, style, element} = this.props;
// eslint-disable-next-line no-unused-vars
const {children, style, element, onScroll, onUpdate, scrollOnDOMChange, cssVarsOnTracks, className, ...rest} = this.props;
const vsb = findChildByType(children, VerticalScrollbarPlaceholder);
const hsb = findChildByType(children, HorizontalScrollbarPlaceholder);
const content = React.Children.toArray(children).filter(child => ![VerticalScrollbarPlaceholder, HorizontalScrollbarPlaceholder].includes(child.type));

return (
<ResizeObserver onResize={this.updateScrollbars}>
<div className='scrollbar' style={style} onTransitionEnd={this.handleOnTransitionEnd}>
<div {...rest} className={classNames('scrollbar', className)} style={style} onTransitionEnd={this.handleOnTransitionEnd}>
{React.cloneElement(element, this.getElementProps(), content)}
<Context.Provider value={this.state}>
{vsb ? vsb.props.children : <VerticalScrollbar/>}
Expand Down