This is a migrated thread and some comments may be shown as answers.

"racEmptyMessage" element remains after clientside entry-add

1 Answer 32 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 01 Mar 2018, 04:09 PM

I'm running into a problem where a clientside add-entry attempt on an empty AutoCompleteBox is growing vertically, breaking my design.  Investigating the DOM indicates that the input, with a class of "racEmptyMessage", remains and is overflowing the height.

Clicking into the AutoCompleteBox to give it focus, then clicking away, resolves the design break.

Here's the code that I'm using to add the entry, pulled from the documentation:

function CreateRABEntry(txt, val)
{
    var rab = $find("<%= AutoCompleteBox1.ClientID %>");
    var newEntry = rab.createEntry(txt, val);
    var entries = rab.get_entries();
    entries.add(newEntry);
}

 

What am I doing wrong here?

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 06 Mar 2018, 12:32 PM
Hi John,

RadAutoComplete does not implements any height-rescriction logic itselt, so this behavior is expected for it. You can avoid it in two possible ways:
  • wrap the control into a fixed height scrollable element, so the design won't be broken when the height gets bigger
  • or directly make the AutoCompleteBox TokenList element scrollable with a similar CSS:
    .RadAutoCompleteBox div.racTokenList {
        height: 100px;
        max-height: 100px;
        overflow-y: auto;
    }


Regards,
Vessy
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
AutoCompleteBox
Asked by
John
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or