0.23.0 • Published 7 years ago

redux-pager v0.23.0

Weekly downloads
50
License
MIT
Repository
github
Last release
7 years ago

redux-pager

Lightweight composable React / Redux pagination component

Build Status codecov

NPM

Install

npm install -S redux-pager

Usage

import React from 'react'
import reduxPager from 'redux-pager'

const Pager = reduxPager({ connect, React })

export default props => (
  <Pager mapRows={
    (state, indices) => state.entities.users.filter((x, i) => i >= indices[0] && i < indices.slice(-1))
  }>
    {pager => (
      <div>
        <div>
          {pager.data.map(x => (
            <div>
              <pre>{JSON.stringify(x, null, 2)}</pre>
            </div>
          ))}
        </div>
        {/* Do something with pager.mapRows /*}
        <span>
          <pager.Buttons>
            <pager.PageSelect />
          </pager.Buttons>
          <pager.RowInfo />
          <pager.PageInfo />
        </span>
      </div>
    )}
  </Pager>
)

Test

See redux-pager's test project at redux-pager-test

In active development, come back in a few days.

0.23.0

7 years ago

0.22.0

7 years ago

0.21.0

7 years ago

0.20.0

7 years ago

0.19.1

7 years ago

0.19.0

7 years ago

0.18.1

7 years ago

0.16.3

7 years ago

0.16.1

8 years ago

0.15.1

8 years ago

0.15.0

8 years ago

0.13.1

8 years ago

0.14.1

8 years ago

0.14.0

8 years ago

0.13.0

8 years ago

0.12.2

8 years ago

0.12.1

8 years ago

0.12.0

8 years ago

0.11.6

8 years ago

0.11.5

8 years ago

0.11.4

8 years ago

0.11.3

8 years ago

0.11.2

8 years ago

0.11.1

8 years ago

0.11.0

8 years ago

0.10.1

8 years ago

0.10.0

8 years ago

0.9.2

8 years ago

0.9.1

8 years ago

0.9.0

8 years ago

0.8.1

8 years ago

0.8.0

8 years ago

0.7.3

8 years ago

0.7.2

8 years ago

0.7.1

8 years ago

0.7.0

8 years ago

0.6.4

8 years ago

0.6.3

8 years ago

0.6.0

8 years ago

0.5.7

8 years ago

0.5.5

8 years ago

0.5.4

8 years ago

0.5.3

8 years ago

0.5.2

8 years ago