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
As recently done in #1065 the native input and change events were replaced by custom events. In one of our codebases we heavily rely on the native events. This breaking change requires a major refactoring. We also have cases where we need some information from the native event, which is not possible anymore.
What is the reasoning behind these changes?
Could an alternative be to leave the native events in place, and use other custom events additionally?
Going forward can we expect for more native events to go away? I.e. should we stop relying on native events support altogether?
The main use case is to keep track of the changes in a model data structure. For this we use the name and value from the event.target to update the data on change. The new events only provide the value, which requires us to refactor our components to include the name in another way.
Because of the current inconsistency it's unclear which events are forwarded and which are dispatched without looking at the documentation. Relying on the name alone doesn't tell if the event is native or not.
Is the ultimate goal to be consistent in not forwarding native events?
As recently done in #1065 the native
input
andchange
events were replaced by custom events. In one of our codebases we heavily rely on the native events. This breaking change requires a major refactoring. We also have cases where we need some information from the native event, which is not possible anymore.You mentioned in #977 (comment) to favor the custom events over native events. That's fair enough as a best practice, but I didn't expect you to drop them altogether 😅. I believe that native events should still be available. Carbon react supports the native events too (i.e. exposes the native event properties).
The text was updated successfully, but these errors were encountered: