react-treebeard icon indicating copy to clipboard operation
react-treebeard copied to clipboard

Support for normalized data

Open cdtinney opened this issue 8 years ago • 0 comments

I have a use case where there can be very deeply nested data that is loaded asynchronously into a Redux store, and is normalized.

e.g.

entities = {
  byId: {
    key1: {...},
    key2: {...},
  },
  allIds: [key1, key2]
}

It would be great if this had first-class support for normalized data.

Perhaps a childAccessor function could be passed as a prop that is called to access the child object when constructing the TreeNode.

cdtinney avatar Oct 17 '17 18:10 cdtinney