File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -61,27 +61,35 @@ export default class NestedListView extends React.PureComponent<Props, State> {
6161 }
6262
6363 render = ( ) => {
64- if ( ! this . props . getChildrenName ) {
64+ const {
65+ data,
66+ getChildrenName,
67+ onNodePressed,
68+ renderNode,
69+ style
70+ } = this . props
71+
72+ if ( ! getChildrenName ) {
6573 return < Text > getChildrenName has been passed</ Text >
6674 }
6775
68- if ( ! this . props . renderNode ) {
76+ if ( ! renderNode ) {
6977 return < Text > renderNode has been passed</ Text >
7078 }
7179
72- if ( ! this . props . data ) {
80+ if ( ! data ) {
7381 return < Text > No data has been passed</ Text >
7482 }
7583
7684 return (
77- < View style = { this . props . style } >
85+ < View style = { style } >
7886 < NodeView
7987 getChildrenName = { this . getChildrenName }
8088 node = { this . state . root }
81- onNodePressed = { this . props . onNodePressed }
89+ onNodePressed = { onNodePressed }
8290 generateIds = { this . generateIds }
8391 level = { 0 }
84- renderNode = { this . props . renderNode }
92+ renderNode = { renderNode }
8593 />
8694 </ View >
8795 )
You can’t perform that action at this time.
0 commit comments