react-nestedlist
Livedemo
For a livedemo click here.
Usage
npm install --save react-nestedlist
import flatMap from 'react-nestedlist/dist/utils/nestedListUtils';import NestedList NestedListItem from 'react-nestedlist';import Immutable from 'immutable'; Component { ; thisstate = tree: Immutable } { if tree !== 'Startpage' return 'Startpage must be first'; return true; } { return <NestedList = = => items draggedId <div ="list"> </div> </NestedList> ; }
Development
# prepare npm install # run development server at http://localhost:8082 npm start # run tests (per default in PhantomJS without coverage report) npm testnpm test -- --coveragenpm test -- --browser chromenpm test -- --browser firefox # build dist bundle npm run dist