smapiot / Piral.Blazor

All .NET things to make Blazor work seamlessly in microfrontends using Piral. :jigsaw:

Home Page:https://piral.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Event listener is not removed

prepfarm opened this issue · comments

Bug Report

Prerequisites

  • [ x] Can you reproduce the problem in a MWE?
  • [ x] Are you running the latest version?
  • [x ] Did you perform a search in the issues?

Environment Details and Version

piral 1.3.3
net7.0 with Piral.Blazor packages are 7.0.10-pre.20231128.2

Description

RemoveEventListener Is not actually removing event listener. Trying out this example inside of my project, is not getting removed and if component gets initialized again (go back and open the page again), number of logs always increases by one (I have added log inside of the ToggleSidebar method).

Expected behavior

Event listener to be removed.

Are you sure that the dispose is called?

Yes, I have added @implements IDisposable and log inside of Dispose method which gets called few seconds after navigating off that page.

Alright thanks for the confirmation - I will look into it.

This is fixed and will be part of v10.