anushkachauhxn / lazy-load-dropdown-search

A component that supports pagination api and loads more options on scroll. It also takes text input and calls api for search.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

⛱ Lazy Load Dropdown with Search

A component that supports pagination api with search.

⭐️ Features

  • On first load, options are loaded from the first page.
  • When user scrolls to the end of the list, options from next page are appended.
  • User can select any option from the list. When user clicks on the close button, the selected option is cleared.

  • When user searches for any option, the api is called again and result is shown without any pagination.
  • When user selects a searched option, the dropdown will contain last shown results for the search.
  • When user clicks on the close button after selection, the selected option is cleared and the list is reset.
  • When user searches for a text but clicks outside (blur) without selecting anything, the list is reset.

🎬 Preview

lazy-load-dropdown-recording.mov

About

A component that supports pagination api and loads more options on scroll. It also takes text input and calls api for search.


Languages

Language:JavaScript 64.5%Language:HTML 31.7%Language:SCSS 3.9%