A component that supports pagination api with search.
- 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.