Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
virtualizedtableforantd4
Advanced tools
The virtualized table component for ant design4, using typescript.
Install
npm i --save virtualizedtableforantd4
the opts of useVT
(examples)
interface vt_opts {
id?: number;
/**
* @default 5
*/
overscanRowCount?: number;
/**
* this only needs the scroll.y
*/
scroll: {
y: number | string;
};
/**
* wheel event(only works on native events).
*/
onScroll?: ({ left, top, isEnd, }:
{ top: number; left: number; isEnd: boolean }) => void;
initTop?: number;
/**
* @default false
*/
debug?: boolean;
// pass -1 means scroll to the bottom of the table
ref?: React.MutableRefObject<{
scrollTo: (y: number) => void;
scrollToIndex: (idx: number) => void;
}>
}
Quick start
You need to change your style like following if your Table.size is not default.
// size={'small'}
ant-table [vt] > table > .ant-table-tbody > tr > td {
padding: 8px;
}
import React from 'react';
import { Table } from 'antd';
import { useVT } from 'virtualizedtableforantd4';
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*/}
/>
Scroll to
Restoring last state
Editable Table
Drag soring
expanded rows & tree-structure has been well supported!
FAQs
The virtualized table component for ant design4/5, using typescript.
The npm package virtualizedtableforantd4 receives a total of 16,898 weekly downloads. As such, virtualizedtableforantd4 popularity was classified as popular.
We found that virtualizedtableforantd4 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.