-
If you make the most basic editor page and click import { useEffect, useRef, useMemo, useState, useCallback } from 'react';
import { DrawIoEmbed} from 'react-drawio';
const Editor = () => {
return (
<div style={{height: "100vh"}}>
< DrawIoEmbed
onClose={(data) => console.log(data)}
/>
</div>
);
};
export default Editor; Is this the expected behaviour? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Yes it is, for now. It was implemented like that initially, but this behaviour might change with a next major change, so that the functionality is split up. What might help you, is that an extra parameter has been added to the onClose response object, so you can detect what triggered the onChange event. If you press ctrl +s, this is the response:
If the exit button is clicked manually, this is the response:
The |
Beta Was this translation helpful? Give feedback.
Yes it is, for now. It was implemented like that initially, but this behaviour might change with a next major change, so that the functionality is split up.
What might help you, is that an extra parameter has been added to the onClose response object, so you can detect what triggered the onChange event. If you press ctrl +s, this is the response:
If the exit button is clicked manually, this is the response:
The
parentEvent
can be used to change behaviour if necessary