Material-Blazor / Material.Blazor

Lightweight Material Theme components for Blazor
Other
244 stars 32 forks source link

MBDebouncedTextField fails to render inside EditForm component #340

Closed skb50bd closed 3 years ago

skb50bd commented 3 years ago

When MBDebouncedTextField is used inside an EditForm Component, it fails to render and throws an exception.

simonziegler commented 3 years ago

Thanks for this. I'll test it out. Can you let me know if you are using a Validate component after it (or using our built in variety)?

However debounced theft fields aren't intended for use inside edit forms and are supposed to disable edit form functionality. Imagine if you were in a form and typed part of a word and then paused for 300ms - you'd be at risk of an immediate validation error.

We're improving this mechanism in the upcoming version 2 and will log a warning if you do put a debounced text field in a form.

In short, we intend these to be used for things like search functionality.

simonziegler commented 3 years ago

@MarkStega and @simonziegler to discuss pending closing this issue.

simonziegler commented 3 years ago

We have decided to leave this as it is, with MBDebouncedTextField not operating within an EditForm, This is documented at https://material-blazor.com/docs/Material.Blazor/Components/DebouncedTextField/MBDebouncedTextField.html.