marcveens / react-drawio

React component for integrating the Diagrams (draw.io) embed iframe
MIT License
40 stars 8 forks source link

Configuration makes the implementation fail #24

Closed pzehle closed 3 weeks ago

pzehle commented 2 months ago

Just adding the configuration tag to the component makes the embedded iframe to just be blank. Adding or removing any options to the object makes no difference:

<DrawIoEmbed
    urlParameters={{
        ui: 'min',
        spin: true,
        saveAndExit: false,
        noSaveBtn: true,
        noExitBtn: true,
    }}
    configuration={{}}
/>

Removing the configuration tag makes it load correctly. Am I doing something wrong?

marcveens commented 2 months ago

Perhaps it's better to make the configuration option undefined if it's not used. Does that help?

pzehle commented 2 months ago

The problem is not actually that, the problem is that I DO want to send configurations to it, since I want to allow only the use of UML libraries.

marcveens commented 2 months ago

In Storybook there a working demo where urlParameters, xml and configurations are combined: https://marcveens.github.io/react-drawio/?path=/story/components-drawioembed--with-configurations (and the code).

If that still doesn't help, could you provide working example using Stackblitz for example so I can have a look?