RadzenAutoComplete MaxLength

Hi. I'm currently working on a way to use your components to input arbitrary values, being able to search and view them to the user from a list and optionally saving that input if it does not exist.

The component that made the most sense was your RadzenAutoComplete component.
What I am missing right now is an option to set its max length attribute.
I saw that behind the autocomplete there is either an input tag or a textarea tag. Both of which do have the maxlength constraint in RadzenTextBox and RadzenTextArea for example.

Would you consider to add the maxlength attribute and serve it as a parameter for RadzenAutoComplete or is there an issue that speaks against that? I think this would be generally helpful, but I would also like to understand if that's not in any scope and I'm overlooking something.

Thanks!

We will gladly accept pull request!

Hello, you still can achieve this with some javascript :

protected override async Task OnAfterRenderAsync(bool firstRender)
{
 if(firstRender)
     jsRuntime.InvokeVoidAsync("YourProject.setMaxLength","AutoComplete",7);
}

//JS
window.YourProject = {
setMaxLength: function (id, maxLength) {
$('#' + id).attr('maxlength', maxLength);
}

Hello Raphaël,

while this is true and I did not think about that I would expect max length of every textbox-like to be considered standard behavior.

As far as I know this is already merged.
I think this would be an interesting discussion but my ultimate opinion probably will boil down to "I don't want to use JS".

Cheers