Skip to content
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

Is there a working react example somewhere? #7

Open
jessejamesrich opened this issue Jun 4, 2021 · 2 comments
Open

Is there a working react example somewhere? #7

jessejamesrich opened this issue Jun 4, 2021 · 2 comments

Comments

@jessejamesrich
Copy link

jessejamesrich commented Jun 4, 2021

Is there, by chance, a codepen or something somewhere that shows how to set this up on react, like your other components which are in storybook?

I keep getting this error:

TypeError: null is not an object (evaluating 'valuesArea.querySelector("[data-id=\"" + name + "\"] input").value = obj[name]')
(anonymous function)
src/react-scenejs-timeline/Timeline.tsx:407
  404 |     this.values = obj;
  405 |     const valuesArea = this.scrollArea.valuesArea.getElement();
  406 |     for (const name in obj) {
> 407 |         valuesArea.querySelector<HTMLInputElement>(`[data-id="${name}"] input`)!.value = obj[name];
      | ^  408 |     }
  409 | }
  410 | 

I'm sure I'm doing something wrong, but I can't figure out what.

Edit: Looking a bit further, I can see Value.tsx is creating an input without the required attribute in Timeline.tsx. Again, I'm sure I'm doing something wrong.

@daybrush
Copy link
Owner

daybrush commented Jun 8, 2021

@jessejamesrich

Temporarily fixed bugs and released. try updating

v1 version of react-scenejs-timeline is being prepared.
When released, I think we will be able to prepare a proper demo.

https://github.com/daybrush/scenejs-timeline/tree/v1/packages/react-scenejs-timeline

@jessejamesrich
Copy link
Author

Oh yeah. That worked. Thank you! Your work is amazing!

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

2 participants