Hi, I would like to trigger a re-render on panel plugin resize. I already successfully manage to catch the resize event:
const resizeObserver = new ResizeObserver(entries => {
console.log(‘RESIZE’);
});
const divElem = document.querySelector(‘body > div’);
if (divElem) {
resizeObserver.observe(divElem);
}
I see the “RESIZE” in the console when changing the panel size, so that works fine so far. How can I re-render the plugin at that point (instead of console.log)?
We might need a little bit more info if you may. Is this a React panel? Have you tried setting a variable with the size you want and then setting the element you want to display with that variable “size”? Also, you can get the panel width and height directly from the props of the plugin, unless you are using a angular panel and that I am not aware.
Please provide some extra info and we will try to help you.