MudBlazor / MudBlazor

Blazor Component Library based on Material design with an emphasis on ease of use. Mainly written in C# with Javascript kept to a bare minimum it empowers .NET developers to easily debug it if needed.
http://mudblazor.com
MIT License
8.13k stars 1.28k forks source link

MudTable: Ability to autocommit when exiting inline edit mode #3659

Open lmorrone opened 2 years ago

lmorrone commented 2 years ago

Feature request type

Enhance component

Component name

MudTable

Is your feature request related to a problem?

To speed up the process of editing rows in a table, when exiting the inline edit mode of a row, we need to execute the Commit event instead of the Cancel event. If we override RowEditCancel to commit the changes, then they will also commit when clicking on the cancel button.

Describe the solution you'd like

Add a new boolean property to MudTable called for example Autocommit or CommitOnEditExit. If set to true, commit changes when exiting edit mode ("focus out"), except if you click the cancel button.

Have you seen this feature anywhere else?

No response

Describe alternatives you've considered

Another alternative would be to add a property called RowEditExit, like RowEditCommit and RowEditCancel, to be able to differentiate when the edit is canceled from the button and when the edit mode is exited without clicking the cancel button, and there decide whether or not to save the changes.

Pull Request

Code of Conduct

rahul7720 commented 2 years ago

vote ++

A better solution would be introducing a new parameter something like AutoCommit="true" when it's set to true the commit/cancel button should be hidden and the data should be committed upon exiting the edit mode.

tnopperProvis commented 1 year ago

Any news on this?

Greenspart commented 6 months ago

Something that you can do as a workaround to kinda solve this is setting the "Immediate" attribute to true on your MudTextField as seen here : https://github.com/MudBlazor/MudBlazor/issues/8200#issuecomment-2111946365

Hope that helps