Our pure JavaScript Scheduler component


Post by rapiduser »

alex.l wrote: Thu Sep 30, 2021 10:05 pm

There is no special ticket for this, we are working on it step by step to support that for all frameworks.

Try to use this override meanwhile:

template() {
   return <custom-tag anyAttribute=`"${(new Date()).getTime()}"`></custom-tag>
}

I am not sure I follow.

I tried plugging a react component into the taskTooltipFeature template callback and it says symbol is not recognized as a string.

Maybe I am misunderstanding


Post by saki »

The above is based on another approach, perhaps even simpler than using React portals, and that is using custom elements that would be implemented in React. We would create <custom-tag> with the help of React the way that is described here: https://reactjs.org/docs/web-components.html Then the above template code would ensure that the tooltip will be recreated after it has been hidden (destroyed).


Post by eladcodicate »

Do you have any update about this issue? It's a must-have feature for us..


Post by saki »

React components (JSX) in tooltips is not yet supported, however, converting an existing React component into a web component, as suggested in previous post, should not be difficult at all. Then the tooltip template function would return the created web component markup.

There are some resources/tutorials on creating WebComponents from React ones:

  1. https://levelup.gitconnected.com/convert-existing-react-components-intowebcomponents-2b33b842ff9a
  2. https://stackoverflow.com/questions/66970860/creating-pure-web-component-from-react-components
  3. https://reactjs.org/docs/web-components.html

You can also consider sponsoring the feature at https://bryntum.com/services


Post by eladcodicate »

Thanks.
I'm using this trick and it's pretty nice for now
viewtopic.php?f=44&t=13554&p=70377&hilit=fetchTooltipHtml#p70377


Post Reply