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

virtualizedtableforantd4

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

virtualizedtableforantd4

The virtualized table component for ant design4, using typescript.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
17K
decreased by-24.08%
Maintainers
1
Weekly downloads
 
Created
Source

The virtualized table component for AntD4,fast and restorable.

npm dm license

NPM

  • Install

    npm i --save virtualizedtableforantd4
    
  • the opts of useVT(examples)

    export interface vt_opts<RecordType> {
        id?: number;
        /**
        * @default 5
        */
        overscanRowCount?: number;
        /**
        * this only needs the scroll.y
        */
        scroll: RcTableProps<RecordType>['scroll'];
        /**
        * wheel event(only works on native events).
        * 滚轮事件(只对原生事件有效)。
        */
        onScroll?: ({ left, top, isEnd, }: {
            top: number;
            left: number;
            isEnd: boolean;
        }) => void;
        initTop?: number;
        /**
        * @default false
        */
        debug?: boolean;
    }
    
  • Quick start

    You need to change your style like following if your Table.size is not default.

    如果你的Table.size不是默认的话,你需要修改像下面一样的style。

    // size={'small'}
    ant-table [vt] > table > .ant-table-tbody > tr > td {
        padding: 8px;
    }
    
    import React from 'react';
    import { Table } from 'antd';
    import { VTComponents } from 'virtualedtableforantd4';
    
    const [ vt, set_components ] = useVT(() => ({ scroll: { y: 600 } }), []);
    
    <Table
      scroll={{ y: 600 }} // It's important for using VT!!! DO NOT FORGET!!!
      components={vt}
      columns={/*your columns*/}
      dataSource={/*your data*/}
    />
    
  • Restoring last state

  • Editable Table

  • Drag soring

License

MIT

Keywords

FAQs

Package last updated on 20 Jun 2020

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