ant-design-blazor/components/drawer
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
..
config fix(drawer): unexpected behavior of Drawer(#1749) (#1771) 2021-07-25 22:41:06 +08:00
style chore: sync ant-design v4.11.1 (#1039) 2021-01-25 08:31:53 +08:00
Drawer.razor fix(module: drawer): OffsetX and offsetY do not work (#1435) (#1448) 2021-05-28 06:10:44 +00:00
Drawer.razor.cs perf: avoid memory leak issue of event listener (#1857) 2021-09-09 12:56:11 +08:00
DrawerContainer.razor fix(drawer): unexpected behavior of Drawer(#1749) (#1771) 2021-07-25 22:41:06 +08:00
DrawerContainer.razor.cs fix(drawer): unexpected behavior of Drawer(#1749) (#1771) 2021-07-25 22:41:06 +08:00
DrawerRef.cs refactor: unified use of FeedbackComponent for modal comfirm and drawer (#1263) 2021-04-04 15:40:54 +08:00
DrawerService.cs chore: remove redundant semi-colons (#1812) 2021-08-13 23:26:58 +08:00