Blazored / Typeahead

Typeahead control for Blazor applications
https://blazored.github.io/Typeahead/
MIT License
439 stars 103 forks source link

[Bug] EditContext IsModified() is True when no change #179

Closed brettwinters closed 3 years ago

brettwinters commented 3 years ago

Describe the bug IsModifed property of the EditContext shows true when no change.

Conversely IsModified() is correct if there is a change or the selection is reset

To Reproduce Steps to reproduce the behavior:

  1. Using the Webassembly demo project, open index.razor
  2. Add the following line to the bottom of the OnInitialized() method : FormModel.SelectedPerson = People.First();
  3. Add the following razor code inside the EditForm <p>@context.IsModified()</p>
  4. Run the project.
  5. Select the same Person, in this case it's "Martelle"
  6. Note that the result displayed is True (should be false since there is no change)

Expected behavior The EditContext should display IsModified == false when there is no change to the selection

Screenshots If applicable, add screenshots to help explain your problem. image

Hosting Model (is this issue happening with a certain hosting model?):

Additional context I'm using the EditContext IsModified() to disable the submit button

mohankumar91 commented 3 years ago

https://github.com/dotnet/aspnetcore/issues/28590