ant-design-blazor/components/core
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
..
Base Merge 0.8.4 to feature 2021-07-18 00:04:11 +08:00
Component perf: avoid memory leak issue of event listener (#1857) 2021-09-09 12:56:11 +08:00
ConfigProvider/Form feat(module: form): support set validation rules on FormItem (#1516) 2021-05-28 09:08:42 +00:00
EventCallbackArgs fix(module: TextArea): sizing bug for components outside viewport (#1155) 2021-03-01 14:50:22 +00:00
Extensions perf: avoid memory leak issue of event listener (#1857) 2021-09-09 12:56:11 +08:00
Feedback fix(module: dialog): Modal and Drawer render reducing and update document and demo (#1701) 2021-07-11 20:48:16 +08:00
Forms refactor: remove the form item dependency (#171) 2020-06-02 07:28:06 +08:00
HashCodes perf(module: table): use hash-code comparison for all the parameters to control UI rendering (#716) 2020-10-25 18:31:31 +08:00
Helpers refactor(module: table): use EnumSelect for table filter (#1777) 2021-07-27 13:43:23 +08:00
Internal feat: improve range picker (#306) 2020-07-05 00:06:34 +08:00
JsInterop perf: avoid memory leak issue of event listener (#1857) 2021-09-09 12:56:11 +08:00
Reflection fix(module: form): DisplayName for FormItem will be not default to property name (#1738) 2021-07-16 23:47:34 +08:00
Services refactor: replace IdGeneratorHelper with DI service that can be replaced by user (#664) 2020-10-10 15:31:32 +08:00
_Imports.razor refactor: refactor the directory structure to match ant-design 2020-03-05 12:17:50 +08:00
AntContainer.razor feat(module: image): add image component (#1038) 2021-01-25 02:05:18 +08:00
AntSizeLDSType.cs fix(module: dropdown): dropdown button missing properties & docs fix for Dropdown & Button (#1609) 2021-06-09 17:51:24 +08:00
CloseEventArgs.cs feat(module: tag): add closing event (#1268) 2021-03-31 19:23:30 +08:00
Color.cs feat(module: button): add colors (#1774) 2021-07-26 10:20:23 +00:00
ComponentStatus.cs fix(drawer): unexpected behavior of Drawer(#1749) (#1771) 2021-07-25 22:41:06 +08:00
CssSizeLength.cs fix(module: avatar): size calculation & CssSizeLength functionality expansion (#1364) 2021-04-16 02:50:31 +00:00
Direction.cs feat(module: space): add wrap, split and size array (#1314) 2021-04-06 14:20:29 +08:00
DirectionVHType.cs feat(module: space): add wrap, split and size array (#1314) 2021-04-06 14:20:29 +08:00
EnumValue.cs refactor: reduce dependence (#301) 2020-07-03 13:37:40 +08:00
EventUtil.cs refactor: unified use of FeedbackComponent for modal comfirm and drawer (#1263) 2021-04-04 15:40:54 +08:00
FocusBehavior.cs fix(module: input): fix & feat & docs & tests: Input general fixes (#1530) 2021-05-27 18:13:26 +08:00
ForwardRef.cs refactor: change namespcae to AntDesign 2020-05-29 00:33:49 +08:00
Point.cs feat: add select component (#222) 2020-06-14 18:54:14 +08:00
PresetColor.cs feat(module: tag): Add custom colors and Enum of Preset Colors (#1514) 2021-05-17 00:40:52 +08:00
RenderMode.cs perf(module: table): use hash-code comparison for all the parameters to control UI rendering (#716) 2020-10-25 18:31:31 +08:00
SortDirection.cs feat(module: table): add sort directions and default sort order (#778) 2021-01-24 13:52:57 +08:00