template in panel resize

Hello,

How refresh content template, when panel is resize?

nkm

Hey @nkm, are you looking to simply refresh the panel, or do you want to redefine the content inside the panel? Either way, you can listen for the onViewResize event, which will trigger right after the view was resized and “refresh” the layout so to speak via the reconstruct method (which will then in turn rebuild the layout using your new config, or the existing one for that matter).

Here is an example of dynamically redefining panel’s template via the define method, and invoking reconstruct straight after to apply the new config: https://snippet.webix.com/0pqx9a86.

I must refresh only template no all panel
https://snippet.webix.com/novpcfur

You won’t be able to listen for an onViewResize event from within a template, as it doesn’t even have an event like that. Instead, you can explicitly update only the view you want from the outside handler: https://snippet.webix.com/4jcixp3w.

Thank you for your help :smiley: