-
Notifications
You must be signed in to change notification settings - Fork 165
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
enum ALIGNMENT needs exported to pass values to scrollToAlignment prop with TypeScript #68
Comments
+1 is there anyway this can be prioritize? the only way to currently make this to work with typescript is by declaring an enum that duplicates the existing ALIGNMENT constant. is there anyway this can be exposed? |
@clauderic are you the maintainer of this repo? there's already a PR for this #69 is there any way this can be merged and released to npm? |
@stephenotalora No idea. As a workaround, you can fork the repo, apply the changes you need and change your project's dependency for the time being to your fork instead if you like. |
thanks @mts, that's what I ended up doing 🙏 too bad the repo seems to have been abandoned... |
FYI, here is my workaround: scrollToAlignment={'auto' as any} |
Hello 🙂
I am using
react-tiny-virtual-list
in a real-world TypeScript project.Apparently the type of scrollToAlignment prop has changed from
string
in v2.1.4 toenum ALIGNMENT
in v2.2.0 and scrollToAlignment props which is not available at the moment in TypeScript becauseenum ALIGNMENT
is not exported inindex.d.ts
I could only use
scrollToAlignment
prop with a value of appropriate type namelyenum ALIGNMENT
as follows:in some-project > node_modules/react-tiny-virtual-list/types/index.d.ts
in some-project > some-component
Appreciated if
scrollToAlignment
is available to use in TypeScript in v2.2.0.I made the following PR to offer a solution to this issue:
https://github.com/clauderic/react-tiny-virtual-list/pull/69
The text was updated successfully, but these errors were encountered: