ant-design-blazor/components/carousel
Tony Yip 4b04f09832 perf: avoid memory leak issue of event listener (#1857)
* perf: avoid memory leak #1834

Avoid memory leak by remove the exclusive parameter and logic in the code block on AddEventListener method in DomEventService class.

The following are the components affected:
components/affix/Affix.razor.cs
components/anchor/Anchor.razor.cs
components/carousel/Carousel.razor.cs
components/core/Component/Overlay/Overlay.razor.cs
components/core/Component/Overlay/OverlayTrigger.razor.cs
components/core/JsInterop/DomEventService.cs
components/descriptions/Descriptions.razor.cs
components/dropdown/DropdownButton.cs
components/grid/Row.razor.cs
components/input/Input.cs
components/input/TextArea.razor.cs
components/layout/Sider.razor.cs
components/list/ListItem.razor.cs
components/select/Select.razor.cs
components/select/internal/SelectContent.razor.cs
components/slider/Slider.razor.cs
components/table/Table.razor.cs
components/tabs/Tabs.razor.cs

* fix override AddEventListener method in AntDesign.TestKit project

* add register/remove event listerner for exclusive use in DomEventService class

* move _dotNetObjects to DomEventListerner class/service, so that users not required to maintain it in each component.

* * move share/reuse dom event listerner methods to DomEventListerner class

* remove method 'AddEventListener' that no longer exists in DomEventService class in AntDesign.TestKit project

* * change the component referring to an IDomEventListerner interface instead of a concrete class,
  so that the component can be tested via a mock TestDomEventListerner.

* introduce DisposeShared and Dispose method in DomEventListerner to ease user remove callback from DomEventListerner

* register IDomEventListerner into DI container instead of create manually

* fix FormatKey

* fix FormatKey

* fix tests

* fix test

* fix test

Co-authored-by: James Yeung <shunjiey@hotmail.com>
2021-09-09 12:56:11 +08:00
..
style chore: sync ant-design v4.14.0 (#1249) 2021-03-31 19:23:29 +08:00
Carousel.razor feat(module: overlay): OverlayTrigger not bound to a div (#937) 2021-01-21 17:20:10 +08:00
Carousel.razor.cs perf: avoid memory leak issue of event listener (#1857) 2021-09-09 12:56:11 +08:00
CarouselDotPosition.cs refactor: add grid and carousel demo (#187) 2020-06-07 00:20:28 +08:00
CarouselEffect.cs refactor: add grid and carousel demo (#187) 2020-06-07 00:20:28 +08:00
CarouselSlick.razor fix(module: carousel): left/right dot position and dynamically slick rendering (#918) 2020-12-26 22:04:00 +08:00
CarouselSlick.razor.cs fix(module: carousel): left/right dot position and dynamically slick rendering (#918) 2020-12-26 22:04:00 +08:00