0.23.0 • Published 9 years ago

redux-pager v0.23.0

Weekly downloads
50
License
MIT
Repository
github
Last release
9 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

9 years ago

0.22.0

9 years ago

0.21.0

9 years ago

0.20.0

9 years ago

0.19.1

9 years ago

0.19.0

9 years ago

0.18.1

9 years ago

0.16.3

9 years ago

0.16.1

9 years ago

0.15.1

9 years ago

0.15.0

9 years ago

0.13.1

9 years ago

0.14.1

10 years ago

0.14.0

10 years ago

0.13.0

10 years ago

0.12.2

10 years ago

0.12.1

10 years ago

0.12.0

10 years ago

0.11.6

10 years ago

0.11.5

10 years ago

0.11.4

10 years ago

0.11.3

10 years ago

0.11.2

10 years ago

0.11.1

10 years ago

0.11.0

10 years ago

0.10.1

10 years ago

0.10.0

10 years ago

0.9.2

10 years ago

0.9.1

10 years ago

0.9.0

10 years ago

0.8.1

10 years ago

0.8.0

10 years ago

0.7.3

10 years ago

0.7.2

10 years ago

0.7.1

10 years ago

0.7.0

10 years ago

0.6.4

10 years ago

0.6.3

10 years ago

0.6.0

10 years ago

0.5.7

10 years ago

0.5.5

10 years ago

0.5.4

10 years ago

0.5.3

10 years ago

0.5.2

10 years ago