You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I've been creating a solution to #263 for my own usage and I managed to get something that works pretty well using a few custom renderers, however I have had to reach into the lib directory and import TreeItem.
This isn't a huge issue, however I have had to also update all my other imports to use 'react-complex-tree/lib/cjs' since NextJS/Webpack switches between the CJS and ESM versions depending on client/server builds so React context gets lost.
Describe the solution you'd like
Expose TreeItem or useTreeItemRenderContext to the main package. If they are still "unstable", maybe expose them under a __UNSTABLE constant?
Hey, thanks for the suggestion. The TreeItem component isn't actually that unstable, but I'd still consider it an implementation detail that doesn't make sense to expose directly. But I did expose it as part of a "INTERNALS" export that I added now in v2.3.3, similar to what you suggested. Note that I renamed TreeItem to TreeItemElement to avoid confusion with the type of the same name TreeItem, which refers to the data field.
For the hook you mentioned, I can actually see realistic use cases for that and it makes more sense to use in normal applications, so I exposed the hook also in v2.3.3 as normal export.
Is your feature request related to a problem? Please describe.
I've been creating a solution to #263 for my own usage and I managed to get something that works pretty well using a few custom renderers, however I have had to reach into the lib directory and import
TreeItem
.This isn't a huge issue, however I have had to also update all my other imports to use
'react-complex-tree/lib/cjs'
since NextJS/Webpack switches between the CJS and ESM versions depending on client/server builds so React context gets lost.Describe the solution you'd like
Expose
TreeItem
oruseTreeItemRenderContext
to the main package. If they are still "unstable", maybe expose them under a__UNSTABLE
constant?Describe alternatives you've considered
'react-complex-tree/lib/cjs'
Additional context
The text was updated successfully, but these errors were encountered: