Make all OnChange function virtual you can overide this functions. #1374

Open
opened 2026-01-29 17:52:49 +00:00 by claunia · 0 comments
Owner

Originally created by @teunlielu on GitHub (Sep 5, 2024).

Is your feature request related to a problem? Please describe.
In the current setup you now program the following:
simple example:
public override string Value { get => base.Value; set { if (value is null) { ChangeEventArgs args = new ChangeEventArgs(); args.Value =""; OnChange(args); // Directly to base.Value you will lose communication with your binding. } else { base.Value = value; } } }

Describe the solution you'd like
Make all OnChange function virtual you can overide this functions.
protected override async Task OnChange(ChangeEventArgs args) { if(args.Value is null) { args.Value = ""; } await base.OnChange(args); }

Originally created by @teunlielu on GitHub (Sep 5, 2024). **Is your feature request related to a problem? Please describe.** In the current setup you now program the following: simple example: ` public override string Value { get => base.Value; set { if (value is null) { ChangeEventArgs args = new ChangeEventArgs(); args.Value =""; OnChange(args); // Directly to base.Value you will lose communication with your binding. } else { base.Value = value; } } } ` **Describe the solution you'd like** Make all OnChange function virtual you can overide this functions. ` protected override async Task OnChange(ChangeEventArgs args) { if(args.Value is null) { args.Value = ""; } await base.OnChange(args); } `
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#1374