File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 11import React from 'react' ;
2- import { Layout , Menu } from 'antd' ;
32import { Route , Switch , Link } from 'react-router-dom' ;
4- import Projects from './projects/Projects ' ;
3+ import { Layout , Menu } from 'antd ' ;
54import { observer } from 'mobx-react' ;
5+ import Projects from './projects/Projects' ;
66
77const { Header } = Layout ;
88
Original file line number Diff line number Diff line change 11import React , { useState } from 'react' ;
22import { Button , Layout , Space } from 'antd' ;
33import { observer } from 'mobx-react' ;
4+ import { useHistory } from 'react-router-dom' ;
45
56import TaskInput from './components/TaskInput' ;
67import rootStore from '../../services/RootStore' ;
@@ -24,12 +25,9 @@ const TaskList = TreeList(
2425 checkable : true ,
2526 onCheck ( keys ) {
2627 tasksStore . checkTasks ( keys as string [ ] ) ;
27- console . log ( 'Check' , keys ) ;
2828 } ,
29- getDefaultChecked ( ) {
30- const taskKeys = tasksStore . getCheckedKeys ( projectStore . activeProject ) ;
31- console . log ( 'Checked List' , taskKeys ) ;
32- return taskKeys ;
29+ getCheckedKeys ( ) {
30+ return tasksStore . getCheckedKeys ( projectStore . activeProject ) ;
3331 } ,
3432 }
3533) ;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export default function TreeList<T extends ITreeItem>(
1616 options ?: {
1717 checkable ?: boolean ;
1818 onCheck ?: ( checkedKeys : React . Key [ ] ) => void ;
19- getDefaultChecked ?: ( ) => React . Key [ ] ;
19+ getCheckedKeys ?: ( ) => React . Key [ ] ;
2020 }
2121) {
2222 return observer ( function TreeList ( { onSelect } : TreeListProps ) {
@@ -92,7 +92,7 @@ export default function TreeList<T extends ITreeItem>(
9292 return (
9393 < Tree
9494 className = "draggable-tree"
95- defaultCheckedKeys = { options ?. getDefaultChecked ?.( ) }
95+ checkedKeys = { options ?. getCheckedKeys ?.( ) }
9696 checkable = { options ?. checkable }
9797 draggable
9898 blockNode
You can’t perform that action at this time.
0 commit comments