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

fast-table

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-table - npm Package Compare versions

Comparing version 1.4.5 to 1.4.6

4

lib/index.js

@@ -703,3 +703,3 @@ 'use strict';

'renderChild',
function() {
function(params) {
if (!_this._renderEnable) {

@@ -709,2 +709,4 @@ return null;

_this.onResize(params);
var _this$props5 = _this.props,

@@ -711,0 +713,0 @@ style = _this$props5.style,

@@ -79,2 +79,20 @@ 'use strict';

function _typeof(obj) {
if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj &&
typeof Symbol === 'function' &&
obj.constructor === Symbol &&
obj !== Symbol.prototype
? 'symbol'
: typeof obj;
};
}
return _typeof(obj);
}
function _classCallCheck(instance, Constructor) {

@@ -257,5 +275,29 @@ if (!(instance instanceof Constructor)) {

_this._cached = {};
_this.columns = _this._uColumns(columns);
_this._cached['groupedColumns'] = columns;
});
_defineProperty(this, '_uColumns', function(columns) {
return columns.map(function(c) {
var column = {};
for (var key in c) {
if (
_typeof(key) !== 'symbol' &&
Object.prototype.hasOwnProperty.call(c, key)
) {
column[key] = c[key];
}
}
var children = column.children || [];
if (children.length > 0) {
column.children = _this._uColumns(children);
}
return column;
});
});
_defineProperty(this, '_calcWidth', function(width, wrapperWidth) {

@@ -262,0 +304,0 @@ if (typeof width === 'string' && percentReg.test(width)) {

@@ -14,3 +14,2 @@ 'use strict';

// import { measureScrollbar } from './utils';
function defaultFunction() {

@@ -17,0 +16,0 @@ return {};

{
"name": "fast-table",
"version": "1.4.5",
"version": "1.4.6",
"description": "react table fast",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -1,9 +0,23 @@

# fast-table
<p align="center">
<a href="https://github.com/Paul-Long/fast-table">
<img width="200" src="http://houym-1254119810.picsh.myqcloud.com/logo-200_150.png">
</a>
</p>
**React表格组件,支持多数据首次快速渲染。**
<h1 align="center">Fast Table</h1>
# future
<div align="center">
add drag table header,Immature version can be viewed [demo](https://paul-long.github.io/react-components/)
React表格组件,支持多数据首次快速渲染
[![npm package](https://img.shields.io/npm/v/fast-table.svg?style=flat)](https://www.npmjs.com/package/fast-table)
[![NPM downloads](http://img.shields.io/npm/dm/fast-table.svg?style=flat-square)](http://npmjs.com/fast-table)
[![Dependencies](https://img.shields.io/david/paul-long/fast-table.svg?style=flat-square)](https://david-dm.org/paul-long/fast-table)
[![DevDependencies](https://img.shields.io/david/dev/paul-long/fast-table.svg?style=flat-square)](https://david-dm.org/paul-long/fast-table?type=dev)
[![Gitter](https://img.shields.io/gitter/room/paul-long/fast-table.svg?style=flat-square)](https://gitter.im/paul-long/paul-long?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Codecov](https://img.shields.io/coveralls/github/paul-long/fast-table.svg?style=flat-square)](https://codecov.io/gh/paul-long/fast-table/branch/master)
[![Issues need help](https://flat.badgen.net/github/label-issues/paul-long/fast-table/help%20wanted/open)](https://github.com/paul-long/fast-table/issues?q=label%3A%22help+wanted%22)
</div>
# 在线Demo

@@ -14,2 +28,4 @@ https://paul-long.github.io/react-components/

[![rc-select](https://nodei.co/npm/fast-table.png)](https://npmjs.org/package/fast-table)
```bash

@@ -28,2 +44,3 @@ npm install fast-table --save-dev

- 子表格订制
- 表头自由排序

@@ -30,0 +47,0 @@ # API

@@ -0,0 +0,0 @@ import React from 'react';

@@ -143,16 +143,17 @@ import React from 'react';

onResize = ({width, height}) => {
this._renderEnable = true;
this._width = width;
this._height = height;
this.cacheManager.reset();
this.sizeManager.update({
_wrapperWidth: width,
_wrapperHeight: height,
_scrollSizeX: measureScrollbar('horizontal'),
_scrollSizeY: measureScrollbar()
});
this.getShowCount();
this.updateColumn();
this.resetShowData();
// this.setState({width, height});
if (this._width !== width || this._height !== height) {
this._renderEnable = true;
this._width = width;
this._height = height;
this.cacheManager.reset();
this.sizeManager.update({
_wrapperWidth: width,
_wrapperHeight: height,
_scrollSizeX: measureScrollbar('horizontal'),
_scrollSizeY: measureScrollbar()
});
this.getShowCount();
this.updateColumn();
this.resetShowData();
}
};

@@ -448,6 +449,7 @@

renderChild = () => {
renderChild = (params) => {
if (!this._renderEnable) {
return null;
}
this.onResize(params);
const {style, prefixCls} = this.props;

@@ -454,0 +456,0 @@ const hasLeftFixed = this.columnManager.isAnyColumnsLeftFixed();

@@ -157,5 +157,25 @@ import React from 'react';

this._cached = {};
this.columns = this._uColumns(columns);
this._cached['groupedColumns'] = columns;
};
_uColumns = (columns) => {
return columns.map((c) => {
let column = {};
for (let key in c) {
if (
typeof key !== 'symbol' &&
Object.prototype.hasOwnProperty.call(c, key)
) {
column[key] = c[key];
}
}
const children = column.children || [];
if (children.length > 0) {
column.children = this._uColumns(children);
}
return column;
});
};
_calcWidth = (width, wrapperWidth) => {

@@ -162,0 +182,0 @@ if (typeof width === 'string' && percentReg.test(width)) {

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