Combobox load data while scrolling

Posted by: vorobjovkirill on 14 September 2017, 12:04 pm EST

  • Posted 14 September 2017, 12:04 pm EST

    Good day,

    Is there a way to load a small portion of Data in Combobox at the start and then while the user scrolls load the rest? Something like

    lazy loading
    or something like with
    FlexGrid
    infinite scroll. But the problem is that Combobox doesn’t have Events like
    scrollPositionChanged
    .

    Thank you for your time.

  • Posted 14 September 2017, 12:05 pm EST

    Hello,

    We are sorry, currently, there is no way to accomplish this.

    We have created an enhancement request to add scrollPositionChanged event for Combobox with tracking id 265310. If it is found feasible, it will be included in the future releases.

    Thanks,

    Manish Kumar Gupta

  • Posted 20 January 2018, 6:40 am EST

    Hi,

    We are sorry for the late reply.

    We may use infinite scroll using standard HTML scroll event.Please refer to the following code snippet:

    using the dropDown’s standard HTML ‘scroll’ event.

      var theCombo = new wijmo.input.ComboBox('#theCombo', {
        selectedIndexChanged: function(s, e) {
         setText('theComboStringCurrent', s.text);
        },
        itemsSource: countries
     });
    
     
    
      // listen to scroll events from the combo's dropDown:
      theCombo.addEventListener(theCombo.dropDown, 'scroll', function(e) {
       console.log('the scroll position is ', e.target.scrollTop)
      })
    

    ~Manish

Need extra support?

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

Learn More

Forum Channels