anuraghazra/react-folder-tree

Any intentions to make this an importable library and deploy to npm?

Opened this issue · 9 comments

Any intentions to make this an importable library and deploy to npm?

initial test shows it's more performant than the lib I'm currently using.

No i currently have no intentions to deploy it NPM. because i think there are lot others which are better than this.

btw what lib you are using?

I use react-treebeard, and for some reason the rerender of the component takes 45ms to render a simple list of 50 items. The same tree takes 1.6ms with your solution, the only issue I have is that the animations have to be disabled because the max-height trick doesn't work for long lists (which is why treebeard uses velocity a javascript animation lib to do it)

wow that's weird... i wonder whats makes react-treebeard slow and my component fast.

Yes that max-height does not work with long lists... probably i can fix that by calculating the max-height dynamically.

I tried a quick attempt at that, but it only worked for the 2nd expand-contract cycle not the first since the height needed to be measured.

I see, okay i will do some experiments and try to solve the issue

@RickeyWard Does treebeard has the CRUD support? I cant see that in their demo, however.
@anuraghazra You said there are other "better npm modules" but I dint find any which has CRUD and imperative API as you have developed. Can you give some reference to other modules which such features are implemented?

@ezorfa What do you mean by "CRUD" support? That's a database layer construct this is a visual layer. You can add remove and update the elements all you want with this or any tree view component I've seen.

@RickeyWard What i mean is that, providing a possiblility to rename, add a file or delete it. Like in the demo version of treebeard, I did not see this feature.

react-tree-beard's demo does not expose that functionality, nor does the library. This library does but only for the imperative api. using the declarative api you would just do that yourself. In general the more features a library has the less likely it will work the way you want it to.