Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
@highlight-run/react-virtuoso
Advanced tools
React Virtuoso is the most powerful React virtual list component, full stop. Here's why:
For live examples and documentation, check the documentation website.
React Virtuoso is proudly sponsored by Stream, the leading provider in enterprise grade Feed & Chat APIs. To learn more about Stream, click here.
If you are using Virtuoso for work, sponsor it. Any donation helps a lot with the project development and maintenance.
npm install react-virtuoso
import * as React from 'react'
import * as ReactDOM from 'react-dom'
import { Virtuoso } from 'react-virtuoso'
const App = () => {
return <Virtuoso style={{ height: '400px' }} totalCount={200} itemContent={index => <div>Item {index}</div>} />
}
ReactDOM.render(<App />, document.getElementById('root'))
The GroupedVirtuoso
component is a variant of the "flat" Virtuoso
, with the following differences:
totalCount
, the component exposes groupCounts: number[]
property, which specifies the amount of items in each group.
For example, passing [20, 30]
will render two groups with 20 and 30 items each;itemContent
property, the component requires an additional groupContent
property,
which renders the group header. The groupContent
callback receives the zero-based group index as a parameter.The VirtuosoGrid
component displays same sized items in multiple columns.
The layout and item sizing is controlled through CSS class properties, which allows you to use media queries, min-width, percentage, etc.
You can customize the markup up to your requirements - check the Material UI list demo. If you need to support reordering, check the React Sortable HOC example.
For in-depth documentation and live examples of the supported features and live demos, check the documentation website.
To support legacy browsers, you might have to load a ResizeObserver Polyfill before using react-virtuoso
:
import ResizeObserver from 'resize-observer-polyfill'
if (!window.ResizeObserver)
window.ResizeObserver = ResizeObserver
Petyo Ivanov @petyosi.
To run the tests, use npm run test
.
An end-to-end browser-based test suite is runnable with npm run e2e
, with the pages being e2e/*.tsx
and the tests e2e/*.test.ts
.
A convenient way to debug something is to preview the test cases in the browser.
To do that, run npm run browse-examples
- it will open a crude UI that lets you browse the components in the e2e
folder.
The documentation site is built with docusaurus and the content is available in the site/docs
directory.
The API reference is generated from the doc comments in src/components.tsx
.
MIT License.
FAQs
Unknown package
The npm package @highlight-run/react-virtuoso receives a total of 1 weekly downloads. As such, @highlight-run/react-virtuoso popularity was classified as not popular.
We found that @highlight-run/react-virtuoso demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.