Suppress NotifyFieldChanged on every Keystroke.

1 Answer 113 Views
General Discussions
Jonathan
Top achievements
Rank 1
Jonathan asked on 26 Nov 2021, 02:00 PM

Hello,

i would like to use this Framewok, but i encountered following roadblock in conjunction with the DI-Framework i am using (SimpleInjector).

As the Input-Components fire NotifyFieldChanged on every keystroke and do not use the "normal" way (onEvent -> triggering the IHandleEvent-Interface) of eventpropagation the DI Container can not apply the correct ServiceScope and thus fails to inject the correct services from Blazor. (NavigationManager, AuthenticationStateProvider)

If i use OnChange it might work, if this was the only event, which was fired. (Which is not, because still NotifyFieldChanged fires)

Please consider to suppress firing NotifyFieldChanged when OnChange is implemented explicitly.

Or perhaps use a property "HandleValidationOn" = "ValidationTrigger.OnBlur/LostFocus | ValidationTrigger.OnInput | ValidationTrigger.Never"

I would take "Never", as i am validating everything in a backend-service which has no knowledge of the UI for better seperation of concerns.

1 Answer, 1 is accepted

Sort by
0
Hristian Stefanov
Telerik team
answered on 01 Dec 2021, 11:22 AM

Hi Jonathan,

The described functionality is in our plans for the next version 2.30.0 (mid-December). We have the following public item for that.

Inputs to Validate only in the OnChange event, not on every keystroke

That feature will allow you to fire the OnChange on Enter/Blur. There will be also a separate OnInput event that will fire for each keystroke.

Regards,
Hristian Stefanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Jonathan
Top achievements
Rank 1
Answers by
Hristian Stefanov
Telerik team
Share this question
or