Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
RickeyWard opened this issue Jun 9, 2020 · 9 comments

Comments

@RickeyWard
Copy link

RickeyWard commented Jun 9, 2020

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.

@anuraghazra
Copy link
Owner

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?

@RickeyWard
Copy link
Author

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)

@anuraghazra
Copy link
Owner

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.

@RickeyWard
Copy link
Author

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.

@anuraghazra
Copy link
Owner

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

@ezorfa
Copy link

ezorfa commented Sep 2, 2020

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

@RickeyWard
Copy link
Author

RickeyWard commented Sep 2, 2020

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

@ezorfa
Copy link

ezorfa commented Sep 2, 2020

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

@RickeyWard
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants