Socket
Socket
Sign inDemoInstall

antd

Package Overview
Dependencies
Maintainers
4
Versions
846
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

antd - npm Package Compare versions

Comparing version 0.7.3-beta3 to 0.7.3-beta4

2

lib/index.js

@@ -31,2 +31,2 @@ require('./index.css');

antd.version = '0.7.3-beta3';
antd.version = '0.7.3-beta4';

@@ -47,17 +47,3 @@ 'use strict';

getInitialState: function getInitialState() {
// 支持两种模式
if (Array.isArray(this.props.dataSource)) {
this.mode = 'local';
// 保留原来的数据
this.originDataSource = this.props.dataSource.slice(0);
} else {
this.mode = 'remote';
this.dataSource = (0, _objectAssign2['default'])({
resolve: function resolve(data) {
return data || [];
},
getParams: function getParams() {},
getPagination: function getPagination() {}
}, this.props.dataSource);
}
this.initDataSource(this.props.dataSource);

@@ -91,3 +77,26 @@ var noPagination = this.props.pagination === false;

}
if ('dataSource' in nextProps) {
this.initDataSource(nextProps.dataSource);
this.setState({
data: nextProps.dataSource
});
}
},
initDataSource: function initDataSource(dataSource) {
// 支持两种模式
if (Array.isArray(dataSource)) {
this.mode = 'local';
// 保留原来的数据
this.originDataSource = dataSource.slice(0);
} else {
this.mode = 'remote';
this.dataSource = (0, _objectAssign2['default'])({
resolve: function resolve(data) {
return data || [];
},
getParams: function getParams() {},
getPagination: function getPagination() {}
}, dataSource);
}
},
initPagination: function initPagination(pagination) {

@@ -94,0 +103,0 @@ return (0, _objectAssign2['default'])({

{
"name": "antd",
"version": "0.7.3-beta3",
"version": "0.7.3-beta4",
"stableVersion": "0.7.2",

@@ -5,0 +5,0 @@ "title": "Ant Design",

Sorry, the diff of this file is not supported yet

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