Skip to content

Commit 595c28b

Browse files
docs(autoComplete): rename TextField to ValueField
1 parent f93ef91 commit 595c28b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/autocomplete/data-bind.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ You can bind the AutoComplete to a model in your application. This is useful whe
5858
To bind the AutoComplete to a model:
5959

6060
1. populate its `Data` property with the collection of items you want in the dropdown
61-
1. set the `TextField` to point to the corresponding name of the model that contains the string data for the suggestions
61+
1. set the `ValueField` to point to the corresponding name of the model that contains the string data for the suggestions
6262
1. point the `Value` parameter to a `string` field in the view-model.
6363

6464
>caption Data binding an AutoComplete to a model
6565
6666
````CSHTML
6767
@TheValue
6868
<br />
69-
<TelerikAutoComplete Data="@Suggestions" TextField="@( nameof(SuggestionsModel.Suggestion) )" @bind-Value="@TheValue" />
69+
<TelerikAutoComplete Data="@Suggestions" ValueField="@( nameof(SuggestionsModel.Suggestion) )" @bind-Value="@TheValue" />
7070
7171
@code{
7272
string TheValue { get; set; }
@@ -107,7 +107,7 @@ The AutoComplete component is generic and its type depends on the type of the mo
107107
````Model
108108
@*Reference when binding to model collections*@
109109
110-
<TelerikAutoComplete @ref="@AutoCompleteRefWithModel" Data="@Suggestions" TextField="@( nameof(SuggestionsModel.Suggestion) )" @bind-Value="@TheValue" />
110+
<TelerikAutoComplete @ref="@AutoCompleteRefWithModel" Data="@Suggestions" ValueField="@( nameof(SuggestionsModel.Suggestion) )" @bind-Value="@TheValue" />
111111
112112
@code{
113113
TelerikAutoComplete<SuggestionsModel> AutoCompleteRefWithModel { get; set; }

components/autocomplete/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ The AutoComplete is a generic component and its type is determined by the type o
5757
* `PopupHeight` - the height of the expanded dropdown list element.
5858
* `PopupWidth` - the width of the expanded dropdown list element.
5959
* `TItem` - the type of the model to which the component is bound. Required if you can't provide `Data` or `Value`. Determines the type of the reference object.
60-
* `TextField` - the name of the field from the model that will be shown as hints to the user. Defaults to `Text`. Not required when binding to a simple list of strings.
6160
* `Value` and `bind-Value`- get/set the value of the component, can be used for binding. Use the `@bind-Value` syntax for two-way binding, for example, to a variable of your own. The `Value` must be a `string`.
61+
* `ValueField` - the name of the field from the model that will be shown as hints to the user. Defaults to `Value`. Not required when binding to a simple list of strings.
6262
* `Width` - the width of the main element.
6363
* Templates - they allow you to control the rendering of items in the component. See the [Templates]({%slug autocomplete-templates%}) article for more details.
6464
* Validation - see the [Input Validation]({%slug common-features/input-validation%}) article for more details.

0 commit comments

Comments
 (0)