You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
there is an issue when using new morph libraries like idiomorph. Idiomorph will insert first the new element in the dom and after remove the old one.
Due to this, the expected lifecycle when loading and replacing a frame (connect - disconnect - connect) is not happening. What happens is the wrong lifecycle (connect - connect - disconnect), letting the component in a wrong state (disconnected).
Let's put a simple controller with tomselect. In this example, at first the tomselect will load correctly. But as soon as the frame is replaced, tomselect is no longer working because the last method call is disconnect() as I explained before, with this output in the console log:
If I put a setTimeout(() => { ... }, 100); around the connect code, then it works as expected (jumpy, but it will delay the execution of the connect logic to after the disconnect method execution):
Hi,
there is an issue when using new morph libraries like idiomorph. Idiomorph will insert first the new element in the dom and after remove the old one.
Due to this, the expected lifecycle when loading and replacing a frame
(connect - disconnect - connect)
is not happening. What happens is the wrong lifecycle(connect - connect - disconnect)
, letting the component in a wrong state (disconnected).Let's put a simple controller with tomselect. In this example, at first the tomselect will load correctly. But as soon as the frame is replaced, tomselect is no longer working because the last method call is
disconnect()
as I explained before, with this output in the console log:If I put a
setTimeout(() => { ... }, 100);
around the connect code, then it works as expected (jumpy, but it will delay the execution of the connect logic to after the disconnect method execution):The text was updated successfully, but these errors were encountered: