Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.0] Unify input components APIs #5732

Open
wants to merge 24 commits into
base: next-2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
bfb4f5c
Introduce Value API to input components
stsrki Sep 9, 2024
d637848
Use CurrentValue for Bulma TextEdit
stsrki Sep 10, 2024
e49949e
Mark Obsolete parameters
stsrki Sep 10, 2024
31284a7
Check Value when initializing validation
stsrki Sep 11, 2024
a26424a
Invoke ValueChanged for Select and DatePicker
stsrki Sep 13, 2024
7e7ab42
Invoke ValueChanged for Radio and Check
stsrki Sep 13, 2024
0b524fc
Merge branch 'master' into dev-unify-input-apis
stsrki Sep 16, 2024
e842464
Refactor Select component
stsrki Sep 18, 2024
a956816
Remove Text from TextEdit and MemoEdit
stsrki Sep 18, 2024
0a21942
Remove Date and Time from DateEdit and TimeEdit
stsrki Sep 18, 2024
618a284
Remove Color from ColorEdit
stsrki Sep 18, 2024
d8e745d
Remove CheckedValue from RadioGroup
stsrki Sep 18, 2024
edad399
Fix Forms page demo
stsrki Sep 18, 2024
eee168f
Remove Checked from Check and Switch
stsrki Sep 18, 2024
6ad4cd1
Remove Color from ColorPicker
stsrki Sep 18, 2024
8831619
Remove Time from TimePicker
stsrki Sep 18, 2024
ee896fd
Remove Date and Dates from DatePicker
stsrki Sep 19, 2024
be4851b
Check for array types on Select
stsrki Sep 19, 2024
2f6bc58
Move ISelect to separate file
stsrki Sep 19, 2024
4fd850d
Migration notes
stsrki Sep 19, 2024
4a5ff26
Move GetFormatedValueExpression to base class
stsrki Sep 19, 2024
e9d4dd4
Move OnInternalValueChanged implementation to base class
stsrki Sep 19, 2024
e9e9cc2
Merge branch 'master' into dev-unify-input-apis
stsrki Sep 20, 2024
2d020e2
Refactor input components initialization (#5742)
stsrki Sep 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Demos/Apps/TodoApp/TodoItem.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ListGroupItem>
<Field Horizontal Padding="Padding.IsAuto.OnAll">
<FieldBody ColumnSize="ColumnSize.Is1">
<Check TValue="bool" Checked="@Todo.Completed" CheckedChanged="@OnCheckedChanged"></Check>
<Check TValue="bool" Value="@Todo.Completed" ValueChanged="@OnCheckedChanged"></Check>
</FieldBody>
<FieldBody ColumnSize="ColumnSize.Is11">
@Todo.Description
Expand Down
4 changes: 2 additions & 2 deletions Demos/Apps/TodoApp/TodoItems.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Fields>
<Column ColumnSize="ColumnSize.Is1">
<Field>
<Check TValue="bool" Checked="@Todos.All(x=>x.Completed)" CheckedChanged="@OnCheckAll">All</Check>
<Check TValue="bool" Value="@Todos.All(x=>x.Completed)" ValueChanged="@OnCheckAll">All</Check>
</Field>
</Column>
<Column ColumnSize="ColumnSize.Is11">
Expand All @@ -19,7 +19,7 @@
<Addon AddonType="AddonType.Body">
<Validations @ref="validations" Mode="ValidationMode.Manual">
<Validation Validator="@ValidationRule.IsNotEmpty">
<TextEdit @bind-Text="@description" Placeholder="What needs to be done?"></TextEdit>
<TextEdit @bind-Value="@description" Placeholder="What needs to be done?"></TextEdit>
</Validation>
</Validations>
</Addon>
Expand Down
4 changes: 2 additions & 2 deletions Demos/Blazorise.Demo/Components/FormularyModal.razor
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
<Field Horizontal>
<FieldLabel ColumnSize="ColumnSize.IsFull.OnTablet.Is3.OnDesktop">First Name</FieldLabel>
<FieldBody ColumnSize="ColumnSize.IsFull.OnTablet.Is9.OnDesktop">
<TextEdit @bind-Text="model.FirstName"></TextEdit>
<TextEdit @bind-Value="model.FirstName"></TextEdit>
</FieldBody>
</Field>

<Field Horizontal>
<FieldLabel ColumnSize="ColumnSize.IsFull.OnTablet.Is3.OnDesktop">Email</FieldLabel>
<FieldBody ColumnSize="ColumnSize.IsFull.OnTablet.Is9.OnDesktop">
<TextEdit @bind-Text="model.Email"></TextEdit>
<TextEdit @bind-Value="model.Email"></TextEdit>
</FieldBody>
</Field>

Expand Down
6 changes: 3 additions & 3 deletions Demos/Blazorise.Demo/Components/TopMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -121,17 +121,17 @@
<Row>
<Column Margin="Margin.Is2.FromBottom">
<Field>
<Switch TValue="bool" Checked="@(Theme?.Enabled == true)" CheckedChanged="@ThemeEnabledChanged">Theme enabled</Switch>
<Switch TValue="bool" Value="@(Theme?.Enabled == true)" ValueChanged="@ThemeEnabledChanged">Theme enabled</Switch>
</Field>
</Column>
</Row>
<Row>
<Column Margin="Margin.Is2.FromBottom">
<Field>
<Check TValue="bool" Checked="@(Theme?.IsGradient == true)" CheckedChanged="@ThemeGradientChanged">Gradient colors</Check>
<Check TValue="bool" Value="@(Theme?.IsGradient == true)" ValueChanged="@ThemeGradientChanged">Gradient colors</Check>
</Field>
<Field>
<Check TValue="bool" Checked="@(Theme?.IsRounded == true)" CheckedChanged="@ThemeRoundedChanged">Rounded elements</Check>
<Check TValue="bool" Value="@(Theme?.IsRounded == true)" ValueChanged="@ThemeRoundedChanged">Rounded elements</Check>
</Field>
</Column>
</Row>
Expand Down
12 changes: 6 additions & 6 deletions Demos/Blazorise.Demo/Pages/Tests/AutocompletesPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<CardBody>
<Field>
<FieldBody>
<Check @bind-Checked="@autocompleteFreeTyping">FreeTyping</Check>
<Check @bind-Value="@autocompleteFreeTyping">FreeTyping</Check>
</FieldBody>
</Field>
<Field Horizontal JustifyContent="JustifyContent.End">
Expand Down Expand Up @@ -57,7 +57,7 @@
<CardBody>
<Field>
<FieldBody>
<Check @bind-Checked="@multipleAutocompleteFreeTyping">FreeTyping</Check>
<Check @bind-Value="@multipleAutocompleteFreeTyping">FreeTyping</Check>
</FieldBody>
</Field>
<Field Horizontal JustifyContent="JustifyContent.End">
Expand Down Expand Up @@ -100,7 +100,7 @@
<CardBody>
<Field>
<FieldBody>
<Check @bind-Checked="@autocompleteReadDataFreeTyping">FreeTyping</Check>
<Check @bind-Value="@autocompleteReadDataFreeTyping">FreeTyping</Check>
</FieldBody>
</Field>

Expand Down Expand Up @@ -147,7 +147,7 @@
<CardBody>
<Field>
<FieldBody>
<Check @bind-Checked="@multipleAutocompleteReadDataFreeTyping">FreeTyping</Check>
<Check @bind-Value="@multipleAutocompleteReadDataFreeTyping">FreeTyping</Check>
</FieldBody>
</Field>

Expand Down Expand Up @@ -199,7 +199,7 @@
<CardBody>
<Field>
<FieldBody>
<Check @bind-Checked="@autocompleteVirtualizeFreeTyping">FreeTyping</Check>
<Check @bind-Value="@autocompleteVirtualizeFreeTyping">FreeTyping</Check>
</FieldBody>
</Field>
<Field Horizontal JustifyContent="JustifyContent.End">
Expand Down Expand Up @@ -247,7 +247,7 @@
<CardBody>
<Field>
<FieldBody>
<Check @bind-Checked="@autocompleteVirtualizeReadDataFreeTyping">FreeTyping</Check>
<Check @bind-Value="@autocompleteVirtualizeReadDataFreeTyping">FreeTyping</Check>
</FieldBody>
</Field>

Expand Down
4 changes: 2 additions & 2 deletions Demos/Blazorise.Demo/Pages/Tests/CarouselPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<CardBody>
<Fields>
<Field ColumnSize="ColumnSize.Is3">
<Switch TValue="bool" @bind-Checked="@showIndicators">Indicators</Switch>
<Switch TValue="bool" @bind-Value="@showIndicators">Indicators</Switch>
</Field>
<Field ColumnSize="ColumnSize.Is3">
<Switch TValue="bool" @bind-Checked="@showControls">Controls</Switch>
<Switch TValue="bool" @bind-Value="@showControls">Controls</Switch>
</Field>
</Fields>
</CardBody>
Expand Down
4 changes: 2 additions & 2 deletions Demos/Blazorise.Demo/Pages/Tests/CropperPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
Aspect Ratio
</FieldLabel>
<FieldBody>
<Select @bind-SelectedValue="@ratio">
<Select @bind-Value="@ratio">
<SelectItem Value="@CropperAspectRatio.Is16x9.Value">16:9</SelectItem>
<SelectItem Value="@CropperAspectRatio.Is4x3.Value">4:3</SelectItem>
<SelectItem Value="@CropperAspectRatio.Is1x1.Value">1:1</SelectItem>
Expand All @@ -48,7 +48,7 @@
</Field>
<Field>
<FieldBody>
<Check @bind-Checked="@enabled">Enabled</Check>
<Check @bind-Value="@enabled">Enabled</Check>
</FieldBody>
</Field>
<Field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</DataGridColumn>
<DataGridCheckColumn TItem="Employee" Field="@nameof(Employee.IsActive)" Caption="Active" Editable Filterable="false">
<DisplayTemplate>
<Check TValue="bool" Checked="context.IsActive" Disabled ReadOnly />
<Check TValue="bool" Value="context.IsActive" Disabled ReadOnly />
</DisplayTemplate>
</DataGridCheckColumn>
</DataGridColumns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</DataGridColumn>
<DataGridCheckColumn TItem="Employee" Field="@nameof(Employee.IsActive)" Caption="Active" Editable Filterable="false">
<DisplayTemplate>
<Check TValue="bool" Checked="context.IsActive" Disabled ReadOnly />
<Check TValue="bool" Value="context.IsActive" Disabled ReadOnly />
</DisplayTemplate>
</DataGridCheckColumn>
</DataGridColumns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</DataGridColumn>
<DataGridCheckColumn TItem="Employee" Field="@nameof(Employee.IsActive)" Caption="Active" Editable Filterable="false">
<DisplayTemplate>
<Check TValue="bool" Checked="context.IsActive" Disabled ReadOnly />
<Check TValue="bool" Value="context.IsActive" Disabled ReadOnly />
</DisplayTemplate>
</DataGridCheckColumn>
</DataGridColumns>
Expand Down
Loading
Loading