scenejs-timeline icon indicating copy to clipboard operation
scenejs-timeline copied to clipboard

Is there a working react example somewhere?

Open jessejamesrich opened this issue 3 years ago • 2 comments

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.

jessejamesrich avatar Jun 04 '21 04:06 jessejamesrich

@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

daybrush avatar Jun 08 '21 18:06 daybrush

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

jessejamesrich avatar Jun 09 '21 02:06 jessejamesrich