Completed
Last Updated: 29 Mar 2021 08:05 by ADMIN
Release 2021.R1.SP.next
Created by: Ramon
Comments: 5
Category: TextArea
Type: Bug Report
5

Bug report

TextArea wrapper does not render correctly in v2021.1.224

Reproduction of the problem

Declare a Html.Kendo().TextArea() in ASP.NET project

Current behavior
The TextArea value does not retain.

Expected/desired behavior
TexArea shall render as in previous Kendo Ui versions

Related to Ticket #1509117
Environment
Kendo UI version: 2021.1.224
Browser: [all]

Completed
Last Updated: 23 Aug 2024 09:39 by ADMIN
Release 2024 Q4 (Nov)

Note: I already opened issue #7910 in the kendo-ui-core repo for this but wasn't sure if I should report this through the Feedback Portal.

 

The TextArea TagHelper does not render the "maxlength" attribute when set via data annotations.

Note: this is essentially the same issue from #6884 but applies to the TextArea helper (and not the TextBox helper), so perhaps the fix for that issue just needs to be applied to the TextArea helper (it's always that easy, right? 😉).

Given the following model property:

[StringLength(500)]
[DisplayName("Example")]
public string Example { get; set; }

 

The Kendo TextArea helper: 

<kendo-textarea for="Example" rows="3"></kendo-textarea>

...generates code without the "maxlength" attribute:

<textarea
   data-val="true"
   data-val-length="The field Example must be a string with a maximum length of 500."
   data-val-length-max="500"
   id="Example"
   name="Example"
   data-role="textarea"
   aria-disabled="false"
   rows="3"
   class="!k-overflow-auto !k-flex-none k-input-inner"
   autocomplete="off">
</textarea>

 

The default ASP.NET Core TextArea helper:

<textarea asp-for="Example" rows="3"></textarea>

...generates code with the "maxlength" attribute:

<textarea
   rows="3"
   data-val="true"
   data-val-length="The field Example must be a string with a maximum length of 500."
   data-val-length-max="500"
   id="Example"
   maxlength="500"
   name="Example">
</textarea>

 

The Kendo helper should generate the "maxlength" attribute like the built-in helper.

Completed
Last Updated: 12 Apr 2022 13:32 by ADMIN
Release 2022.R1.SP.next
Created by: Daniel
Comments: 0
Category: TextArea
Type: Feature Request
0

Model binding is supported for the TextArea HTML Helper

@Html.Kendo().TextAreaFor(x => x.Test).Rows(3)

but the corresponding option for the TagHelper is not implemented

<kendo-textarea for="@Model.Test" rows="3"></kendo-textarea>