PeriodTypeSelector, how to change value programmatically #4355
Answered
by
stsrki
PavloParafiloCricut
asked this question in
Q&A
-
If try to change it via component reference Dates, it is some warning. |
Beta Was this translation helpful? Give feedback.
Answered by
stsrki
Dec 2, 2022
Replies: 1 comment 2 replies
-
You're not supposed to change parameters directly. That warning comes from Blazor and warns you not to do it. Remember, Blazor, like most other SPA frameworks, prefer a declarative approach. That means you need to set parameters through the razor syntax. Pseudo sample code: <DatePicker Dates="@someDates" ... />
Task OnSomeAction()
{
someDates = newDates;
return Task.CompletedTask;
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
PavloParafiloCricut
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're not supposed to change parameters directly. That warning comes from Blazor and warns you not to do it. Remember, Blazor, like most other SPA frameworks, prefer a declarative approach. That means you need to set parameters through the razor syntax.
Pseudo sample code: