Skip to content

v5.1.0

Compare
Choose a tag to compare
@moroshko moroshko released this 10 Aug 00:27
· 56 commits to master since this release

Added a new renderItemsContainer prop, which can be used, for example, to limit the scrolling to items container only:

import IsolatedScroll from 'react-isolated-scroll';

function renderItemsContainer({ ref, ...rest }) {
  const callRef = isolatedScroll => {
    if (isolatedScroll !== null) {
      ref(isolatedScroll.component);
    }
  };

  return (
    <IsolatedScroll {...rest} ref={callRef} />
  );
}

<Autowhatever renderItemsContainer={renderItemsContainer} ... />