jQuery UI Widgets Forums Lists ListBox Ensure SelectedIndex is visble after clear search field

This topic contains 1 reply, has 2 voices, and was last updated by  Martin 2 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Jhutt
    Participant

    Not sure exactly how to explain this but here goes.

    The user uses the Search field to find the entry they want, so there is now a selected entry, then they clear the Search field.
    The selected entry may no longer be in the visible area and they may need to manually scroll down to find the one they selected.

    Can I automate that if there is a selected entry, and the search field is cleared, that selectedindex is visible in the viewable area?

    It feels like I’ll need to add a manual listener to achieve this but not certain what it would look like.

    Hope I’ve explained this well enough.


    Martin
    Participant

    Hello Jhutt,

    You can bind to the keyup event of the filter input and use the ensureVisible method with the selected index.
    Please, take a look at the following Example.

    Best Regards,
    Martin Yotov

    jQWidgets team
    https://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.