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
I am trying to make a primary navigation using the Tabs component and routing. Please see my attached example project reproducing the issue. A selection change event is fired unexpectedly although I unregistered the listener before selecting the tab. To reproduce, start the maven goal "spring-boot:run", open the site at localhost:8080 and do:
click on tab SubView3 (navigates to /subView3)
click on link above tabs, produces logs:
Before enter: SubView1Sub1
Tab selected: SubView1
Before enter: SubView1
Instead of just navigating to the sub sub view 1, additionally it is called a tab selection change event on tab SubView1 which opens that view. But that selection change event is not expected since in MainView#beforeEnter I unregister the event listener before selecting the tab.
Tested with 10.0.2 as well as 11.0.0.beta1, same behavior.
The reason of this behavior is: selection event is fired from the client side.
That's why you get the event even though you have unregister the listener.
You don't get the event when you set selection from the server side. Because at this time listener is
unregistered.
But then you register it back and a selection event from the client side triggers your listener.
It looks like we get selection events for the "selected" property even if it has the same value. "selected" property is synchronized with the client side and an event is sent from the client side every time when selection is changed even if the value is the same.
This should not happen.
This is definitely a bug and needs to be fixed somehow.
I am trying to make a primary navigation using the Tabs component and routing. Please see my attached example project reproducing the issue. A selection change event is fired unexpectedly although I unregistered the listener before selecting the tab. To reproduce, start the maven goal "spring-boot:run", open the site at localhost:8080 and do:
Instead of just navigating to the sub sub view 1, additionally it is called a tab selection change event on tab SubView1 which opens that view. But that selection change event is not expected since in MainView#beforeEnter I unregister the event listener before selecting the tab.
Tested with 10.0.2 as well as 11.0.0.beta1, same behavior.
Example project:
my-starter-project.zip
The text was updated successfully, but these errors were encountered: