antd-table-infinity
Advanced tools
Comparing version 1.1.1 to 1.1.2
import 'intersection-observer'; | ||
import 'intersection-observer'; | ||
import SumTable from './SumTable'; | ||
@@ -4,0 +3,0 @@ import PageTable from './PageTable'; |
@@ -361,6 +361,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
loadingIndicator: loadingIndicator | ||
}), React.createElement(Table, _extends({}, rest, { | ||
}), React.createElement(Table, _extends({ | ||
rowKey: record => record.key | ||
}, rest, { | ||
ref: forwardedRef, | ||
columns: columns, | ||
rowKey: record => record.key, | ||
dataSource: dataSource.slice(startIndex, startIndex + pageSize), | ||
@@ -367,0 +368,0 @@ pagination: false |
@@ -591,6 +591,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
className: `infinity-page-table-pagination ${pagination && pagination.className ? pagination.className : ''}` | ||
})), React.createElement(Table, _extends({}, rest, { | ||
})), React.createElement(Table, _extends({ | ||
rowKey: record => record.key | ||
}, rest, { | ||
ref: forwardedRef, | ||
columns: columns, | ||
rowKey: record => record.key, | ||
dataSource: dataSource, | ||
@@ -597,0 +598,0 @@ pagination: false, |
@@ -63,3 +63,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
footer: this.footerRender, | ||
className: "sum-table" | ||
className: `sum-table ${this.props.className ? this.props.className : ''}` | ||
})); | ||
@@ -66,0 +66,0 @@ } |
@@ -376,6 +376,7 @@ "use strict"; | ||
loadingIndicator: loadingIndicator | ||
}), _react.default.createElement(_antd.Table, _extends({}, rest, { | ||
}), _react.default.createElement(_antd.Table, _extends({ | ||
rowKey: record => record.key | ||
}, rest, { | ||
ref: forwardedRef, | ||
columns: columns, | ||
rowKey: record => record.key, | ||
dataSource: dataSource.slice(startIndex, startIndex + pageSize), | ||
@@ -382,0 +383,0 @@ pagination: false |
@@ -606,6 +606,7 @@ "use strict"; | ||
className: `infinity-page-table-pagination ${pagination && pagination.className ? pagination.className : ''}` | ||
})), _react.default.createElement(_antd.Table, _extends({}, rest, { | ||
})), _react.default.createElement(_antd.Table, _extends({ | ||
rowKey: record => record.key | ||
}, rest, { | ||
ref: forwardedRef, | ||
columns: columns, | ||
rowKey: record => record.key, | ||
dataSource: dataSource, | ||
@@ -612,0 +613,0 @@ pagination: false, |
@@ -76,3 +76,3 @@ "use strict"; | ||
footer: this.footerRender, | ||
className: "sum-table" | ||
className: `sum-table ${this.props.className ? this.props.className : ''}` | ||
})); | ||
@@ -79,0 +79,0 @@ } |
{ | ||
"name": "antd-table-infinity", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"scripts": { | ||
@@ -15,4 +15,3 @@ "storybook": "start-storybook -p 9001 -c .storybook", | ||
"lint": "eslint ./**/*.jsx --ext .jsx --ext .js --fix", | ||
"prepublishOnly": "yarn build && npm config set registry http://registry.npmjs.org", | ||
"postpublish": "yarn config set registry https://registry.npm.taobao.org" | ||
"prepublishOnly": "npm version patch && yarn build" | ||
}, | ||
@@ -73,2 +72,6 @@ "betterScripts": { | ||
"description": "An infinite scroll component based on antd table that supports virtual scrolling & high-performance form http://keruyun.com/", | ||
"publishConfig": { | ||
"registry": "http://registry.npmjs.org", | ||
"access": "public" | ||
}, | ||
"peerDependencies": { | ||
@@ -79,3 +82,3 @@ "react": ">=16.4.0", | ||
"dependencies": { | ||
"antd-table-infinity": "^1.1.1", | ||
"antd-table-infinity": "^1.1.2", | ||
"intersection-observer": "^0.5.1", | ||
@@ -82,0 +85,0 @@ "lodash.throttle": "^4.1.1" |
@@ -298,11 +298,4 @@ 中文 | [English](./README_en.md) | ||
3. 不包含IntersectionObserver Polyfill的导入 | ||
- `import PageTable 'antd-table-infinity/PageTable'` | ||
- `import InfinityTable 'antd-table-infinity/InfinityTable'` | ||
- `import SumTable 'antd-table-infinity/SumTable'` | ||
### 已发现问题 | ||
- 当做单元格编辑功能的时候(如在input中连继输入字符,本质上是 Antd Table 接收新的props的反复渲染),在开发模式下会存在性能问题,生产环境不会存在!主要是来自 HMR 和 Redux DevTools的性能消耗。 |
import 'intersection-observer'; | ||
import 'intersection-observer'; | ||
import SumTable from './SumTable'; | ||
@@ -4,0 +3,0 @@ import PageTable from './PageTable'; |
@@ -354,6 +354,6 @@ import React, { PureComponent, Fragment } from 'react'; | ||
<Table | ||
rowKey={record => record.key} | ||
{...rest} | ||
ref={forwardedRef} | ||
columns={columns} | ||
rowKey={record => record.key} | ||
dataSource={dataSource.slice(startIndex, startIndex + pageSize)} | ||
@@ -360,0 +360,0 @@ pagination={false} |
@@ -621,6 +621,6 @@ import React, { Component, Fragment } from 'react'; | ||
<Table | ||
rowKey={record => record.key} | ||
{...rest} | ||
ref={forwardedRef} | ||
columns={columns} | ||
rowKey={record => record.key} | ||
dataSource={dataSource} | ||
@@ -627,0 +627,0 @@ pagination={false} |
@@ -55,3 +55,5 @@ import { bool, number, array, object, func } from 'prop-types'; | ||
footer={this.footerRender} | ||
className="sum-table" | ||
className={`sum-table ${ | ||
this.props.className ? this.props.className : '' | ||
}`} | ||
/> | ||
@@ -58,0 +60,0 @@ ); |
@@ -11,2 +11,7 @@ import React from 'react'; | ||
{ | ||
"path": "/InfinityTable", | ||
"exact": true, | ||
"component": require('../InfinityTable.js').default | ||
}, | ||
{ | ||
"path": "/PageTable", | ||
@@ -22,7 +27,2 @@ "exact": true, | ||
{ | ||
"path": "/", | ||
"exact": true, | ||
"component": require('../index.js').default | ||
}, | ||
{ | ||
"component": () => React.createElement(require('/Users/lilun/workspace/antd-table-infinity/node_modules/umi-build-dev/lib/plugins/404/NotFound.js').default, { pagesPath: 'src/pages', hasRoutesInConfig: false }) | ||
@@ -29,0 +29,0 @@ } |
@@ -10,10 +10,7 @@ import { Spin } from 'antd'; | ||
import '../components/Table/index.less'; | ||
// import { SumTable as Table } from '../components/Table'; | ||
// import '../components/Table/SumTable/index.css'; | ||
// import { SumTable as Table } from '../dist/index'; | ||
// import '../components/Table/index.less'; | ||
// import { InfinityTable as Table } from '../dist/index'; | ||
// import '../dist/index.css'; | ||
class App extends Component { | ||
@@ -20,0 +17,0 @@ state = { |
@@ -46,2 +46,3 @@ import React, { Component } from 'react'; | ||
dataSource={this.state.data} | ||
className="custom-classname" | ||
bordered | ||
@@ -48,0 +49,0 @@ debug |
@@ -33,2 +33,3 @@ import React, { Component } from 'react'; | ||
dataSource={this.state.data} | ||
className="custom-classname" | ||
bordered | ||
@@ -35,0 +36,0 @@ debug |
Sorry, the diff of this file is too big to display
1624587
4234
300
Updatedantd-table-infinity@^1.1.2