react-folder-tree icon indicating copy to clipboard operation
react-folder-tree copied to clipboard

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

Open RickeyWard opened this issue 5 years ago • 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.

RickeyWard avatar Jun 09 '20 17:06 RickeyWard

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?

anuraghazra avatar Jun 10 '20 12:06 anuraghazra

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)

RickeyWard avatar Jun 10 '20 14:06 RickeyWard

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.

anuraghazra avatar Jun 10 '20 14:06 anuraghazra

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.

RickeyWard avatar Jun 10 '20 14:06 RickeyWard

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

anuraghazra avatar Jun 10 '20 15:06 anuraghazra

@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 avatar Sep 02 '20 13:09 ezorfa

@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 avatar Sep 02 '20 19:09 RickeyWard

@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.

ezorfa avatar Sep 02 '20 19:09 ezorfa

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.

RickeyWard avatar Sep 02 '20 20:09 RickeyWard