React-sortable-tree: How to use the nodeContentRenderer?

Created on 5 Oct 2016  路  8Comments  路  Source: frontend-collective/react-sortable-tree

How do I transfer my component?

nodeContentRenderer(data) {
   return (
      <div>
        nodeContentRenderer
      </div>
    );
 }

Most helpful comment

Thanks @fritz-c

Could you please also share some guidance on how to use nodeContentRenderer?
Thanks

All 8 comments

Sorry, I did not see the prompt react-sortable-tree.js. Everything cool

Hi @batazor ,
Actually I am geting some difficulty to understand react-sortable-tree.js.
So can you please provide some code snippet to use nodeContentRenderer .

Thanks,

@fritz-c and @batazor I am having the Tree Data in below format. (eg. {name: ..., users: [ ... ]})

My JSON format:

[ { 'id': '1', 'name': 'Value1', 'users': [ { 'name': 'Value2',  }, { 'name': 'Value3', 'users': [ { 'name': 'Value4',  } ] }, { 'name': 'Value4', 'users': [ { 'name': 'Value5',  } ] }, { 'name': 'Value5',  }, { 'name': 'Value6', 'users': [ { 'name': 'Value7',  } ] } ] } ]

Can you please tell me what is the best way to convert it into required TreeData format
(like {title: ..., children:[ ... ]})

Can I use nodeRenderer to render the tree without changing the JSON key or else I have to change the format of my JSON?

@fritz-c Please provide some suggestion.

Thanks.

@fritz-c can you please provide some snipped for nodeContentRenderer to render any kind of JSON format.

Please help me to out of it.

@anil1712 Did you figure this out? I need some help too on this

@fgiarritiello please check out #53 for the answer to anil1712's question.

Thanks @fritz-c

Could you please also share some guidance on how to use nodeContentRenderer?
Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CrazyCodingBanana picture CrazyCodingBanana  路  4Comments

kaueDM picture kaueDM  路  3Comments

xmhscratch picture xmhscratch  路  5Comments

oarashi picture oarashi  路  5Comments

anushkadoyan picture anushkadoyan  路  4Comments