@@ -11,10 +11,8 @@ import Divider from '@material-ui/core/Divider';
1111import { TextOption } from 'components' ;
1212import List from '@material-ui/core/List' ;
1313import ListItem from '@material-ui/core/ListItem' ;
14- import ListItemIcon from '@material-ui/core/ListItemIcon' ;
15- import PersonIcon from '@material-ui/icons/Person' ;
16- import ListItemText from '@material-ui/core/ListItemText' ;
1714import { hideDrawer , setFilterText , setCursorItem } from 'redux/modules/demos/orgeditor' ;
15+ import NodeDragSource from './NodeDragSource' ;
1816
1917const drawerWidth = 350 ;
2018
@@ -33,6 +31,11 @@ const useStyles = makeStyles((theme) => ({
3331 // necessary for content to be below app bar
3432 ...theme . mixins . toolbar ,
3533 justifyContent : 'flex-start' ,
34+ } ,
35+ listItem : {
36+ margin : theme . spacing ( 1 ) ,
37+ width : 220 ,
38+ height : 120
3639 }
3740} ) ) ;
3841
@@ -73,12 +76,9 @@ function SearchDrawer(props) { // eslint-disable-line react/prefer-stateless-fun
7376 onChange = { value => dispatch ( setFilterText ( value ) ) }
7477 />
7578 < List aria-label = "children-list" >
76- { filteredItems . map ( ( value , index ) => (
77- < ListItem key = { `item-${ value . id } ` } button onClick = { ( ) => dispatch ( setCursorItem ( value . id , isPrimary ) ) } >
78- < ListItemIcon >
79- < PersonIcon />
80- </ ListItemIcon >
81- < ListItemText primary = { value . title } />
79+ { filteredItems . map ( ( itemConfig , index ) => (
80+ < ListItem className = { styles . listItem } key = { `item-${ itemConfig . id } ` } button onClick = { ( ) => dispatch ( setCursorItem ( itemConfig . id , isPrimary ) ) } >
81+ < NodeDragSource itemConfig = { itemConfig } > </ NodeDragSource >
8282 </ ListItem >
8383 ) ) }
8484 </ List >
0 commit comments