Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MudForm: IsModified #1517

Closed
steveoandrey opened this issue May 7, 2021 · 2 comments
Closed

MudForm: IsModified #1517

steveoandrey opened this issue May 7, 2021 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@steveoandrey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
On EditContext, there is a IsModied property & an EventListener OnFieldChanged. This does not exist on MudForm. Because of this, there is no simple way to find out if the form has changed, as far as I know.

Describe the solution you'd like

A IsModified property on mudform, preferably bindable (@bind-IsModified), to adjust handling when modified -> for example disable some buttons.

Describe alternatives you've considered
Using EditForm as an alternative
Some magic with a hidden field

Awesome library by the way, thank you for all your work

@steveoandrey steveoandrey added the enhancement New feature or request label May 7, 2021
@henon
Copy link
Collaborator

henon commented May 13, 2021

ok, this is easy. MudForm already tracks if any of its form controls are touched. We just need to expose the info in a two-way bindable property. Would you PR this?

@steveoandrey
Copy link
Contributor Author

Ok nice I'll give it a try

henon pushed a commit that referenced this issue May 15, 2021
* Added bind-able istouched property

* Update FormIsTouchedTest.razor

Co-authored-by: steve.oliver.andrey <steve.oliver.andrey@iet-gibb.ch>
@henon henon closed this as completed May 15, 2021
@henon henon added this to the 5.0.9 milestone May 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants