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
Scheduler - Antipattern at "onRemove" and "onAdd" events, throws Binding to event property 'onAdd' is disallowed for security reasons, please use (Add)
#1164
Open
luiscla27 opened this issue
Apr 21, 2021
· 2 comments
Description:
Currently onRemove and onAdd are not events, they are input parameters of Function type, this is consider as a bad practice in Angular as you can easily lose control of this references. The current implementation looks like this:
That's not only scheduler issue. There are a lot of other DX Angular components which have this problem.
A simple workaround is to use arrow function, so you can still access the component class.
At least, an alias should be added for Angular implementations.
luiscla27
changed the title
Scheduler - Antipattern at "onRemove" and "onAdd" events
Scheduler - Antipattern at "onRemove" and "onAdd" events, throws Binding to event property 'onAdd' is disallowed for security reasons, please use (Add)
Apr 28, 2021
Feature request
Package versions you currently use:
Description:
Currently
onRemove
andonAdd
are not events, they are input parameters ofFunction
type, this is consider as a bad practice in Angular as you can easily lose control ofthis
references. The current implementation looks like this:Preferred Solution:
The expected implementation for
<dxo-appointment-dragging>
would look like this:Alternatives:
Currently I'm stickin with your
Function
"events", the following is the demo where I found this issue:https://js.devexpress.com/Demos/WidgetsGallery/Demo/Scheduler/CustomDragAndDrop/Angular/Light/
The text was updated successfully, but these errors were encountered: