You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NumericEdit, NumericPicker: with Value, and ValueChanged
DateEdit, DatePicker: with Date and DateChanged
TimeEdit, TimePicker: with Time and TimeChanged
Select: with SelectedValue and SelectedValueChanged
etc.
We need to unify all APIs and make them more standardized. My proposal is to have
Value, and ValueChanged for all input components.
It will be better for the users as they will not need to remember each API for each component. A lot of times, they try <Text @bind-Value="@value" />, and it surprises them when it doesn't work.
The change will greatly improve our codebase also as we will not need to have many abstraction layers that convert the internal value into the external value via those APIs. We will also be able to centralize most of the validation logic at the BaseInputComponent.
There are some edge-case components like Select that have several APIs, SelectedValue and SelectedValues for Multiple mode. I think naming them Value and Values is a good alternative.
The change is obviously a breaking-change. So, we need to document all and update all examples in the documentation. Not to mention that a migration guide is much needed.
The text was updated successfully, but these errors were encountered:
Not sure if it makes sense but you could leave current value settings and mark as deprecated but also add the new consistent ones. Depending on your user base size it would allow them to more slowly migrate to the new settings rather than breaking things.
Not sure if it makes sense but you could leave current value settings and mark as deprecated but also add the new consistent ones. Depending on your user base size it would allow them to more slowly migrate to the new settings rather than breaking things.
That might be the good way for the time being. We can just propagate Value to internals without breaking anything. And as you said, users will have time to adjust.
We have
TextEdit
: withText
andTextChanged
NumericEdit
,NumericPicker
: withValue
, andValueChanged
DateEdit
,DatePicker
: withDate
andDateChanged
TimeEdit
,TimePicker
: withTime
andTimeChanged
Select
: withSelectedValue
andSelectedValueChanged
We need to unify all APIs and make them more standardized. My proposal is to have
Value
, andValueChanged
for all input components.It will be better for the users as they will not need to remember each API for each component. A lot of times, they try
<Text @bind-Value="@value" />
, and it surprises them when it doesn't work.The change will greatly improve our codebase also as we will not need to have many abstraction layers that convert the internal value into the external value via those APIs. We will also be able to centralize most of the validation logic at the
BaseInputComponent
.There are some edge-case components like
Select
that have several APIs,SelectedValue
andSelectedValues
forMultiple
mode. I think naming themValue
andValues
is a good alternative.The change is obviously a breaking-change. So, we need to document all and update all examples in the documentation. Not to mention that a migration guide is much needed.
The text was updated successfully, but these errors were encountered: