Gathering detailed insights and metrics for react-select-async-paginate-self
Gathering detailed insights and metrics for react-select-async-paginate-self
Gathering detailed insights and metrics for react-select-async-paginate-self
Gathering detailed insights and metrics for react-select-async-paginate-self
npm install react-select-async-paginate-self
Typescript
Module System
Node Version
NPM Version
46.5
Supply Chain
85.9
Quality
73
Maintenance
100
Vulnerability
99.3
License
JavaScript (100%)
Total Downloads
861
Last Day
1
Last Week
2
Last Month
15
Last Year
121
30 Commits
2 Watching
1 Branches
1 Contributors
Latest Version
0.1.1
Package Id
react-select-async-paginate-self@0.1.1
Unpacked Size
15.19 kB
Size
4.74 kB
File Count
4
NPM Version
5.6.0
Node Version
8.11.2
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-60%
2
Compared to previous week
Last month
275%
15
Compared to previous month
Last year
-12.3%
121
Compared to previous year
3
Wrapper above react-select
that supports pagination on menu scroll.
This (react-select-async-paginate
0.2.x) is the version of react-select-async-paginate
for use with react-select
2.x. For use with react-select
1.x you can install react-select-async-paginate
0.1.x.
npm install react-select react-select-async-paginate
or
yarn add react-select react-select-async-paginate
AsyncPaginate
is an alternative of Select.Async
but supports loading page by page. It is wrapper above default react-select
thus it accepts all props of default Select
except isLoading
. And there are some new props:
loadOptions
Required. Async function that take two arguments:
It should return next object:
{
options: [{ label: 'label', value: 'value' }, ...],
hasMore: true/false,
}
It similar to loadOptions
from Select.Async
but there is some differences:
hasMore
for detect end of options list for current search.cacheUniq
Not required. Can take any value. When this prop changed, AsyncPaginate
cleans all cached options.
selectRef
Ref for take react-select
instance.
import AsyncPaginate from 'react-select-async-paginate';
...
/*
* assuming the API returns something like this:
* const json = {
* results: [
* {
* value: 1,
* label: 'Audi',
* },
* {
* value: 2,
* label: 'Mercedes',
* },
* {
* value: 3,
* label: 'BMW',
* },
* ],
* has_more: true,
* };
*/
async function loadOptions(search, loadedOptions) {
const response = await fetch(`/awesome-api-url/?search=${search}&offset=${loadedOptions.length}`);
const responseJSON = await response.json();
return {
options: responseJSON.results,
hasMore: responseJSON.has_more,
};
}
<AsyncPaginate
value={value}
loadOptions={loadOptions}
onChange={setValue}
/>
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
133 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More