Coder Social home page Coder Social logo

trendingtechnology / react-object-list Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uptick/react-object-list

0.0 1.0 0.0 2.89 MB

Neat table/list views with filtering and pagination support; powered by React.

License: MIT License

JavaScript 93.74% HTML 0.53% CSS 5.57% Shell 0.16%

react-object-list's Introduction

react-object-list

npm version Downloads Build Status codecov

Component used to display an array of object based data in a sortable, filterable, paginated, list based view, powered by React.

Custom components can be passed in if they are designed to handle the same props as the default components. This functionality is available for the DataRenderer, Pagination and ErrorMessage and your component can simply be passed in through the props with one of the above keys.

Live Demo

Check out the live demo here: http://uptick.github.io/react-object-list/

Installation

Install the package:

yarn add react-object-list

Ensure you have all peer dependencies installed

yarn add classnames moment prop-types react-month-picker react-select

Include icons from FontAwesome 4:

import React from 'react'
import ReactDOM from 'react-dom'

import ObjectList from 'react-object-list'
import {FontAwesome} from 'react-object-list/icons'

var mount = document.querySelectorAll('div.browser-mount');
ReactDOM.render(
  <ObjectList
    icons={icons.FontAwesome(4)}
  />,
  mount[0]
);

or your own icons by specifying as so:

  <ObjectList
    icons={{
      OptionalFields: <i className="list" />,
      Favourites: <i className="heart" />,
      RemoveFavourite: <i className="trash" />,
      RemoveFilter: <i className="minus-circle" />,
      DropdownOpen: <i className="caret-down" />,
      DropdownClose: <i className="caret-up" />,
      SortAsc: <i className="caret-up" />,
      SortDesc: <i className="caret-down" />,
      Unsorted: <i className="sort" />,
      Loading: <i className="circle-notch spin" />,
      CheckboxChecked: <i className="check-square" />,
      CheckboxUnchecked: <i className="square" />,
    }}
  />

Unspecified icons will not show (excl. RemoveFavourite, SortAsc, SortDesc, CheckboxChecked, CheckboxUnchecked, RemoveFilter).

react-object-list's People

Contributors

scaredcat avatar jarekwg avatar bor3ham avatar sticky-bits avatar furious-luke avatar seanthompsonuptick avatar aidanlister avatar andrew-ang avatar ctassparker avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.