salim-lachdhaf / dropdown_search

Simple and robust Dropdown with item search feature, making it possible to use an offline item list or filtering URL for easy customization.
MIT License
346 stars 334 forks source link

Hey Package Developer #704

Closed divyanshpatidar85 closed 1 week ago

divyanshpatidar85 commented 3 weeks ago

I have a requirement like in search box whenever i type i want to hit an api mean onchanged functionality second one lazy loading like whenver i scroll complete drop down then i want load more item else not if this features are already present then how i can use it. I tried to much but i did not find any soluction regarding it

salim-lachdhaf commented 1 week ago

these is a minimalist example :

DropdownSearch<String>(
  items: (filter, loadProps) => callAPI(filter, loadProps!.take, loadProps!.skip),//your api fn
  suffixProps: DropdownSuffixProps(clearButtonProps: ClearButtonProps(isVisible: true)),
    popupProps: PopupProps.menu(
      showSearchBox: true,
      infiniteScrollProps: InfiniteScrollProps(loadProps: LoadProps(take: 20, skip: 0)), // your lazy loading params
    ),
  )