Following Problem, the code below shows a Modal where I can edit Info about Machines, the problem is that when I apply changes to the parameters in the form, and I hit cancel, the changes will apply to the parameters anyway, so the same as I would hit update.
And maybe its something simple and I just dont see it, im relatively new to C# and Blazor.. Would be very nice if someone could help out :)
private async Task Edit Machine(PhysicalMachineInfo machineInfo)
{
var parameters = new ModalParameters();
parameters.Add(nameof(CreatePhysicalMachineModal.physicalMachine), machineInfo);
var createMachineEntryModal = Modal.Show<CreatePhysicalMachineModal>("Edit MachineInfo",parameters);
var modalResult = await createMachineEntryModal.Result;
if (!modalResult.Cancelled)
{
_ = LoadMachines();
}
}