New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

simple-virtual-list

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-virtual-list

A simple and basic React virtual list

latest
npmnpm
Version
1.1.4
Version published
Maintainers
1
Created
Source

A simple and basic React virtual list to display large amount of data efficiently.

Installing

Using npm:

$ npm install simple-virtual-list

Using bower:

$ bower install simple-virtual-list

Using yarn:

$ yarn add simple-virtual-list

Using jsDelivr CDN:

<script src="https://cdn.jsdelivr.net/npm/simple-virtual-list/index.js"></script>

Using unpkg CDN:

<script src="https://unpkg.com/simple-virtual-list/index.js"></script>

Test it on codesandbox.

Example

import React from 'react';
import SimpleVirtualList from 'simple-virtual-list';
const data = [];
for (let i = 0; i < 500; i++) {
  data.push({ id: i + 1, title1: 'title - ' + (i + 1) });
}
const DemoApp = (props) => {
  return (
    <div style={{ height: '200px', width: '200px' }}>
      <SimpleVirtualList
        datasource={data} // mandatory
        rowHeight={21} // optional
        itemKey={'id'} // optional
        display={'title1'} // mandatory if there is no title key in records
        renderItem={(item) => <span>{item.title1} </span>} // optional
      />
    </div>
  );
};
export default DemoApp;

Keywords

simple

FAQs

Package last updated on 17 Jul 2022

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