Autocomplete filter returns only 6 results

Posted by: webworx on 9 October 2017, 12:21 am EST

    • Post Options:
    • Link

    Posted 9 October 2017, 12:21 am EST

    Hi, the autocompleter filter return always 6 results even if there are more matching results in the datasource.

    Try here: http://jsfiddle.net/37GHw/333/ and enter “ru” or “en”. This happens also on the wijmo Demos. What can i do to show all matching results?

    Best regards, asmo

  • Posted 9 October 2017, 12:40 am EST

    I found it, ist the maxItems property.

  • Posted 9 October 2017, 3:17 pm EST

    Hi

    Glad to know that you have resolved your issue.

    ~Manish Kr Gupta

  • Posted 28 November 2017, 2:48 am EST

    Sorry how to set maxItems property? I specified on the template but it does always all the result. Is this something I can specified in the template or it has to specify in controller(angular1.*) or component(angular2)

     <wj-auto-complete min-length="1"
                                      name="projId"
                                      ng-model="projId"
                                      control="projectControl"
                                      maxItems="20"
                                      items-source="model.projects"
                                      selected-value="schedRsrcTime.projId"
                                      selected-value-path="projId"
                                      display-member-path="caption"                                  
                                      selected-index-changed="model.projectChanged(projectControl.selectedItem, activityControl, schedRsrcTime)"
                                      class="wj-form-control"></wj-auto-complete>
    
  • Posted 28 November 2017, 7:39 pm EST

    Please use ‘max-items’

  • Posted 30 November 2017, 3:39 am EST

  • Posted 30 November 2017, 4:17 am EST

    Hum… maybe I misunderstood the functionality of this attribute. It should always display less than 5 either you specify text or not( when just clicking on the down arrow button).

  • Posted 3 December 2017, 7:48 pm EST

    MaxItems property limits the number of suggestion items in drop down.

  • Posted 3 December 2017, 8:39 pm EST

    Hi,

    If you looking to limit the items in DropDown then you can use use CSS.

    .wj-dropdown-panel :nth-child(1n+6){
     display:none
    }
    

    http://jsfiddle.net/g7e0qkap/

  • Posted 5 December 2017, 5:46 am EST

    Ok. It works when you specify more than 2 characters. I was hoping it does for when it’s empty too. I was trying to resolve the issue of not rendering all the items when I have 10000 records to display but I guess I can filter the result in the server side.

  • Posted 5 December 2017, 10:23 pm EST

    Hi,

    Probably, you are looking for the an autoComplete that can retrieve data from server using itemsSourceFunction and also show items if text length is null.

    Please refer to the following plunker for the same:

    http://plnkr.co/edit/JMTgaczENYH4VBHngCkv

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels