Please give a brief summary of your issue:
Attempting to render custom element in context popup menu, it works when providing a DOM element in the render function, but if I provide JSX which I believe is supported it does not render.
Please describe your issue and provide steps to reproduce it:
Hello, I’m AiRon, an automated tech support bot While you wait for one of our customer support representatives, I can help you with your question.
It seems like you’re experiencing an issue with rendering a custom element using JSX in the WebViewer’s context popup menu. This can happen due to how WebViewer handles rendering of custom elements. WebViewer expects a direct DOM element or a React element that can be directly rendered. When using JSX, make sure that the component is correctly set up to handle updates and rendering within WebViewer’s environment.
Some things you can try:
Ensure that the JSX component is a valid React component and can be rendered by React as expected.
Check if your JSX component needs to trigger re-renders by using hooks like useEffect to manage updates when props or state changes.
Consider using WebViewer’s built-in components like Stateful Button or Custom Button if they fit your needs better.
Verify that the component is correctly registered and updated in the WebViewer’s UI lifecycle.