Custom Blazor Input Control Wrapper Components not updating correctly. #2374
Unanswered
adrianwright109
asked this question in
Questions
Replies: 2 comments
-
I suggest that you check out the PropertyInfo class: https://github.com/MarimerLLC/csla/blob/main/Source/Csla.Blazor/PropertyInfo.cs It looks like the setter will update the model property and notify that the model property has changed, but will it also notify that the Value property has changed? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I also don't see the vm.ModelPropertyChanged code in your razor file to make sure StateHasChanged are called.
Not sure if this will have an impact? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I need some help with a Blazor implementation of input controls. I am using CSLA with Telerik Blazor controls.
I have taken the standard Telerik Blazor
TelerikTextBox
andTelerikNumericTextBox
controls and created my own custom component wrappers to those controls calledCslaTextInput
andCslaNumericInput
.The wrapper components have a
Property
[Parameter]
that takes in aCsla.Blazor.IPropertyInfo
from aBusinessBase
model.e.g.
Then in the wrapper the the Telerik component binds the value based on the
Csla.Blazor.IPropertyInfo
Valuee.g.
Where as the standard Telerik component deals directly with the property
e.g.
I believe the issue I am facing (not 100% sure) is that when the
Value
property of theCsla.Blazor.IPropertyInfo
changes the Blazor UI doesn't get notified that a change has been made and doesn't update the bound model value on screen.The below video shows the issue on the custom control where the bound model value to the right of the control doesn't stay in sync with the input control value until a different control is changed and forces an update on screen.
If I update the model behind the scenes it works
https://drive.google.com/file/d/1Exfl0U39GU_61vCjieTp5w-TN6yx6rbp/view?usp=sharing
https://github.com/adrianwright109/CSLAInputControls
Beta Was this translation helpful? Give feedback.
All reactions