Skip to content

Commit

Permalink
chore(common): rename bind
Browse files Browse the repository at this point in the history
  • Loading branch information
marin-bratanov committed Jun 19, 2019
1 parent 95d21d2 commit 5c07cce
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 17 deletions.
12 changes: 6 additions & 6 deletions common-features/input-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,23 @@ Simple textbox-like inputs do not have any special behavior. You need to bind th
<ValidationSummary />
<p class="name">
Name: <TelerikTextBox bind-Value="@person.Name"></TelerikTextBox>
Name: <TelerikTextBox @bind-Value="person.Name"></TelerikTextBox>
<ValidationMessage For="@(() => person.Name)"></ValidationMessage>
</p>
<p class="height">
Height (cm): <TelerikNumericTextBox bind-Value="@person.Height" />
Height (cm): <TelerikNumericTextBox @bind-Value="person.Height" />
<ValidationMessage For="@(() => person.Height)"></ValidationMessage>
</p>
<p class="birthday">
Birthday: <TelerikDateInput bind-Value="@person.Birthday" Format="dd MMMM yyyy"></TelerikDateInput>
Birthday: <TelerikDateInput @bind-Value="person.Birthday" Format="dd MMMM yyyy"></TelerikDateInput>
<ValidationMessage For="@(() => person.Birthday)"></ValidationMessage>
</p>
<p class="favorite-day">
Favorite date: <TelerikDatePicker bind-Value="@person.FavoriteDay" Format="dd MMMM yyyy"></TelerikDatePicker>
Favorite date: <TelerikDatePicker @bind-Value="person.FavoriteDay" Format="dd MMMM yyyy"></TelerikDatePicker>
<ValidationMessage For="@(() => person.FavoriteDay)"></ValidationMessage>
</p>
<p class="accepts-terms">
Accepts terms: <InputCheckbox bind-Value="@person.AcceptsTerms" />
Accepts terms: <InputCheckbox @bind-Value="person.AcceptsTerms" />
<ValidationMessage For="@(() => person.AcceptsTerms)"></ValidationMessage>
</p>
Expand Down Expand Up @@ -119,7 +119,7 @@ The DropDownList always has an item selected - the first item from its data sour
<DataAnnotationsValidator />
<ValidationSummary />
<p class="gender">
Gender: <TelerikDropDownList bind-Value="@person.Gender" DefaultItem="@ddlHint"
Gender: <TelerikDropDownList @bind-Value="person.Gender" DefaultItem="@ddlHint"
Data="@genders" TextField="MyTextField" ValueField="MyValueField">
</TelerikDropDownList>
<ValidationMessage For="@(() => person.Gender)"></ValidationMessage>
Expand Down
2 changes: 1 addition & 1 deletion components/animationcontainer/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The animation container exposes the following properties:
My content goes here.
</TelerikAnimationContainer>
<select bind="@AnimType">
<select @bind="AnimType">
@foreach (var possibleAnimation in Enum.GetValues(typeof(AnimationType)))
{
<option value="@possibleAnimation">@possibleAnimation</option>
Expand Down
4 changes: 2 additions & 2 deletions components/dateinput/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ To use a Telerik Date Input for Blazor:
````CSHTML
@using Telerik.Blazor.Components.DateInput
<TelerikDateInput @ref="theDateInput" bind-Value="@dateInputValue"></TelerikDateInput>
<TelerikDateInput @ref="theDateInput" @bind-Value="dateInputValue"></TelerikDateInput>
@code {
Telerik.Blazor.Components.DateInput.TelerikDateInput theDateInput;
Expand Down Expand Up @@ -77,7 +77,7 @@ The date input provides the following features:
<EditForm Model="@person">
<DataAnnotationsValidator />
<ValidationSummary />
<TelerikDateInput bind-Value="@person.Birthday" ParsingErrorMessage="plase enter a full date like 29 March 2019" Format="dd/MMMM/yyyy">
<TelerikDateInput @bind-Value="person.Birthday" ParsingErrorMessage="plase enter a full date like 29 March 2019" Format="dd/MMMM/yyyy">
</TelerikDateInput>
<ValidationMessage For="@(() => person.Birthday)"></ValidationMessage>
<button type="submit">submit</button>
Expand Down
2 changes: 1 addition & 1 deletion components/datepicker/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ To use a Telerik Date Picker for Blazor:
````CSHTML
@using Telerik.Blazor.Components.DatePicker
<TelerikDatePicker bind-Value="@datePickerValue" ValueChanged="@ValueChanged"></TelerikDatePicker>
<TelerikDatePicker @bind-Value="datePickerValue" ValueChanged="@ValueChanged"></TelerikDatePicker>
<br />The selected date is: @selectedDate?.ToShortDateString()
Expand Down
4 changes: 2 additions & 2 deletions components/dropdownlist/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ To use a Telerik DropDownList for Blazor
````CSHTML
@using Telerik.Blazor.Components.DropDownList
<TelerikDropDownList Data="@myDdlData" TextField="MyTextField" ValueField="MyValueField" ValueChanged="@MyValueChangedHandler" bind-Value="@selectedValue">
<TelerikDropDownList Data="@myDdlData" TextField="MyTextField" ValueField="MyValueField" ValueChanged="@MyValueChangedHandler" @bind-Value="selectedValue">
</TelerikDropDownList>
@code {
Expand Down Expand Up @@ -142,7 +142,7 @@ The DropDownList component attempts to infer the type of its model and value bas
<DataAnnotationsValidator />
<ValidationSummary />
<p class="gender">
Gender: <TelerikDropDownList bind-Value="@person.Gender" DefaultItem="@ddlHint"
Gender: <TelerikDropDownList @bind-Value="person.Gender" DefaultItem="@ddlHint"
Data="@genders" TextField="MyTextField" ValueField="MyValueField">
</TelerikDropDownList>
<ValidationMessage For="@(() => person.Gender)"></ValidationMessage>
Expand Down
3 changes: 1 addition & 2 deletions components/grid/templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ If you need to perform logic more complex than simple data binding, use the chan
<EditorTemplate>
@{
CurrentlyEditedEmployee = context as SampleData;
<select bind=@CurrentlyEditedEmployee.Role>
<select @bind="CurrentlyEditedEmployee.Role">
@foreach (string item in Roles)
{
<option value=@item>@item</option>
Expand Down Expand Up @@ -233,4 +233,3 @@ If you need to perform logic more complex than simple data binding, use the chan
* [Live Demo: Grid Templates](https://demos.telerik.com/blazor-ui/grid/templates)
* [Live Demo: Grid Custom Editor Template](https://demos.telerik.com/blazor-ui/grid/customeditor)


2 changes: 1 addition & 1 deletion components/numerictextbox/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The numeric textbox component is generic, meaning that it takes the type of its
````CSHTML
@using Telerik.Blazor.Components.NumericTextBox
<TelerikNumericTextBox @ref="myNumericTextboxRef" bind-Value="@CurrentValue"></TelerikNumericTextBox>
<TelerikNumericTextBox @ref="myNumericTextboxRef" @bind-Value="CurrentValue"></TelerikNumericTextBox>
@code {
//determines the type of the component
Expand Down
4 changes: 2 additions & 2 deletions components/textbox/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To use a Telerik Textbox for Blazor, add the `TelerikTextBox` tag.
````CSHTML
@using Telerik.Blazor.Components.TextBox
<TelerikTextBox ValueChanged="@MyValueChangeHandler" bind-Value="@theTbValue"
<TelerikTextBox ValueChanged="@MyValueChangeHandler" @bind-Value="theTbValue"
Label="Enter Information" Id="myInputId" MaxLength="20"></TelerikTextBox>
@result
Expand Down Expand Up @@ -73,7 +73,7 @@ The length, enabled and pattern attributes are HTML attributes on the `<input />
<EditForm Model="@person">
<DataAnnotationsValidator />
<ValidationSummary />
<TelerikTextBox bind-Value="@person.CardNumber" Pattern="[0-9]{13,16}">
<TelerikTextBox @bind-Value="person.CardNumber" Pattern="[0-9]{13,16}">
</TelerikTextBox>
<button type="submit">submit</button>
</EditForm>
Expand Down

0 comments on commit 5c07cce

Please sign in to comment.