New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-lazy-dropdown

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-lazy-dropdown

[react-lazy-dropdown] is a very useful react component for multi selection dropdown based on lazy loading option by API calls with async lazy Filtering, Sorting and Tags with custom functions can be provided from the outside

  • 1.5.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-lazy-dropdown

[react-lazy-dropdown] is a very useful react component for multi selection dropdown based on lazy loading option by API calls with async lazy Filtering, Sorting and Tags with custom functions can be provided from the outside

lazy loading multi selection with tags and lazy async filter

Screenshot

lazy loading single selection and lazy async filter

Screenshot

Installation

npm install react-lazy-dropdown

Usage

import {LazySelect} from 'react-lazy-dropdown/dist/index';


  const displayShowMoreOptionCallBack = (selectedOptions) => {
    alert(selectedOptions.length +" items selected");
  };

  const selectionChangedCallBack = (selectedOptions) => {
    console.log(selectedOptions.length +" items selected");
  };


  return (
    <>
      <div className="m-5" style={{width: '500px'}}>
        <LazySelect
          ApiURL={
            'https://--------/Get-------List'
          }
          UniqueKey={'Id'} // object unique key - must be unique per object
          DisplayBy={'Name'}
          PlaceHolder={'Select Methods'}
          useQueryParams={false}
          useBodyParams={true}
          RequestMethod={'post'}
          ExistingRequestParams={{
            FilterByPlatform: false,
            -----------------------,
          }}
          ExistingRequestHeaders={{
            Authorization: `bearer eyJhbGciOi-----------------`,
          }}
          PageSize={10}
          SearchRequestParamName={'search'}
          StartFromRequestParamName={'From'}
          PageSizeRequestParamName={'Size'}
          ResponseResultsHierarchy={'data/Value/Results'}
          DisplayShowMoreOption={true}
          MaximunOptionToShow={3}
          DisplayShowMoreOptionCallBack={displayShowMoreOptionCallBack}
          SelectionChangedCallBack={selectionChangedCallBack}
          IsMulti={true}
          ShowTags={true}
        />
      </div>
    </>
  );

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Keywords

FAQs

Package last updated on 28 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc