An isomorphic group of components for table data and pagination.
npm install react-list-combo
A group of isomorphic reactjs components for rendering lists.
bash
npm install react-list-combo
`$3
ListView:
`xml
`
* initData: (required) The initial page of results or all results.
* dataSource: (optional) Only required for server side pagination. Has a page parameter to specify the next page of results.
* perPage: (optional) Only required for client side pagination.ListRows:
`xml
{Component}
`
* rowClassName: (optional) The css class to add to each row.
* Component: (required) The component to render for each row. parameter passed are data and id.GridView:
`xml
`
* tableClassName: (optional) The class to apply to the table.
* currentData: (required) The data to show. If nested under ListView it will be provided automatically.
* currentPage: (required) The currentPage to show. If nested under ListView it will be provided automatically.
* perPage: (required) The current number of results to show. If nested under ListView it will be provided automatically.GridColumn:
`xml
{Component}
`
* header: (optional) The column header.
* name: (required) The object key for each row.
* Component: (optional) Can be a custom component to help display the data.Counter
`xml
{Component}
`
* wrapperClassName: (optional) class to add to the wrapper div.
* currentPage: (required) The current page. If directly under ListView will be provided automatically.
* perPage: (required) The number to show per page. If directly under ListView will be provided automatically.
* totalCount: (required) The total count of items. If directly under ListView will be provided automatically.
* Component: (optional) Can be a custom component to change how to display the data.Pagination:
`xml
`
* currentPage: (required) The current page index. If directly nested under ListView will be provided automatically.
* pagesCount: (required) The total number of pages. If directly nested under ListView will be provided automatically.
* pageSpan: (optional - default: 2) The breadth of page numbers to display.
* changePage: (required) function to execute when pagination is used. If directly nested under ListView will be provided automatically. Callback has page number as a parameter.
$3
Bootstrap basic usage. see examples for more info.
`xml
``Examples are provided in the examples folder. There is an example of both server
and client style pagination that use the same endpoint. The example uses redux.
https://github.com/shockjs/react-list-combo/tree/master/dist/examples
> The MIT License (MIT)
> Copyright (c) 2015 Damian Dennis
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.