An open API service indexing awesome lists of open source software.

https://github.com/fluse/react-scroll-bound

Prevent scrolling on parent element if list reached end or start.
https://github.com/fluse/react-scroll-bound

component es6 overflow parent prevent react react-component reactjs scroll scrolling

Last synced: 8 months ago
JSON representation

Prevent scrolling on parent element if list reached end or start.

Awesome Lists containing this project

README

          

# react-scroll-bound

Prevent scrolling on parent element if list reached end or start.

Brings a better control for user and increase use experience.

**[Watch Demo](https://fluse.github.io/react-scroll-bound/)**

supports react 15.x and 16.x

## Install

```
npm install react-scroll-bound --save
```

## Usage

```jsx
import ScrollBound from 'react-scroll-bound'

{this.getListPoints()}

```

Set css for element overflow scroll

```css
.my-class-name {
max-height: 250px;
overflow-y: auto;
}
```

### Change HTML-Tag

default tagName is `

    `

    ```jsx

    {this.getListPoints()}

    ```

    ### Set properties

    all attributes and properties will transmitted with `{...this.props}`

    ```jsx

    {this.getListPoints()}

    ```

    ## Development

    if you want to add or optimize this component, feel free <3

    #### Run Dev Server

    ```
    npm start
    ```

    ### Compile to ES5

    ```
    npm run compile
    ```

    ## Give me a coffee

    [![Donate](https://img.shields.io/badge/donate-%20%E2%9D%A4%20-green.svg)](https://www.paypal.me/schauf)

    [get in touch?](http://www.holger-schauf.de)