At first, I tried using FieldIdentifier, but we had several problems.
FieldIdentifier is only available on Validations. I tried to bring it down to input level, but it was too complex and it broke the validation. We can reconsider this for 2.0 as I have realized we had to break some APIs also.
The FieldIdentifier was generating invalid names, eg. FieldName instead of Model.FieldName.
So, I went and saw how they do it in .NET core. I have copied their helpers, who are internal only and brought them to Blazorise. Then, I used some of the code to generate the name attribute. simplified it, and made it to work with our components. It works as expected.
One problem, though. On our Radio component, we already have the Name parameter. I still need to see what to do with it.
I still want to see if there is only room for improvement. This is only a first run.
Closes #5592
At first, I tried using
FieldIdentifier
, but we had several problems.FieldName
instead ofModel.FieldName
.So, I went and saw how they do it in .NET core. I have copied their helpers, who are internal only and brought them to Blazorise. Then, I used some of the code to generate the name attribute. simplified it, and made it to work with our components. It works as expected.
One problem, though. On our
Radio
component, we already have theName
parameter. I still need to see what to do with it.I still want to see if there is only room for improvement. This is only a first run.
@mrpmorris Any chance you could test it?