🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

react-expandable-listview

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-expandable-listview

listview which can be expanded to show its children

Source
npmnpm
Version
0.1.2
Version published
Weekly downloads
8
-70.37%
Maintainers
1
Weekly downloads
 
Created
Source

React expandable listview

Gitter

React expandable listview

Installation

npm

$ npm install --save react-expandable-listview

Demo

http://cht8687.github.io/react-expandable-listview/example/

Usage

<ReactExpandableListView 
        data={data} 
        headerAttName="headerName"
        itemsAttName="items" 
        styles={styles}
      />

Options

data: PropTypes.array.isRequired

const DATALIST = [
{
 	headerName : "ListA",
 	isOpened: true,
    items : [{
      title : "items1"
    }, {
      title : "items2"
    }]
},
{
 	headerName : "ListB",
 	isOpened: true,
    items : [{
      title : "items1"
    }, {
      title : "items2"
    }]
}
];

headerAttName: PropTypes.string.isRequired

variable name of header in your data object. In above example, it's headerName.

itemsAttName: PropTypes.string.isRequired

variable name which hold items data in your data object. In above example, it's items.

styles: PropTypes.object.isRequired

let styles = {
   outerDiv: {
    height: '400px',
    overflowY: 'auto',
    outline: '1px dashed blue',
    width: '400px',
  },

  ul: {
    margin: '0px',
    listStyleType: 'none',
    padding: '0'
  },

  fixedPosition: {
    position : 'fixed',
    width : '383px',
    top: '0px'
  },

  listHeader: {
    width: '383px',
    height: '20px',
    background: 'orange',
    color: 'white'
  },

  listItems: {
    color: 'blue'
  },
};

outerDiv, ul, fixedPosition, listHeader, listItems are required, you can modify the CSS to meet your needs.

Development

$ git clone git@github.com:cht8687/react-expandable-listview.git
$ cd react-expandable-listview
$ npm install
$ webpack-dev-server

tip: If you have already had webpack-dev-server running, you might have EADDRINUSE error, please ensure the port is not in use.

Then

open http://localhost:8080/webpack-dev-server/

License

MIT

Keywords

react

FAQs

Package last updated on 01 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts