Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-tabulator

Package Overview
Dependencies
Maintainers
1
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-tabulator - npm Package Compare versions

Comparing version 0.5.6 to 0.5.8

lib/React15Tabulator.js

2

CHANGELOG.md

@@ -1,2 +0,2 @@

## [0.5.6] - 2018-10-14
## [0.5.8] - 2018-10-14

@@ -3,0 +3,0 @@ ### Added

"use strict";
exports.__esModule = true;
var ReactTabulator_1 = require("./ReactTabulator");
var React15Tabulator_1 = require("./React15Tabulator");
var ReactTabulatorExample_1 = require("./ReactTabulatorExample");
module.exports = {
ReactTabulator: ReactTabulator_1["default"],
React15Tabulator: React15Tabulator_1["default"],
ReactTabulatorExample: ReactTabulatorExample_1["default"]
};

@@ -33,2 +33,14 @@ "use strict";

var Tabulator = require('tabulator-tables');
function isSameArray(a, b) {
var i = a.length;
if (i !== b.length) {
return false;
}
while (i--) {
if (a[i] !== b[i]) {
return false;
}
}
return true;
}
var default_1 = /** @class */ (function (_super) {

@@ -90,4 +102,7 @@ __extends(default_1, _super);

}
if (state && props.data.length > 0) {
return __assign({}, state, { data: props.data }); // this triggers componentDidUpdate
if (state && props.data) {
// this triggers componentDidUpdate
if (!isSameArray(state.data, props.data)) {
return __assign({}, state, { data: props.data });
}
}

@@ -105,2 +120,3 @@ return {};

default_1.prototype.componentDidUpdate = function () {
// console.log('- componentDidUpdate');
this.table.setData(this.state.data);

@@ -107,0 +123,0 @@ };

@@ -68,2 +68,5 @@ "use strict";

};
_this.clearData = function () {
_this.setState({ data: [] });
};
return _this;

@@ -80,4 +83,6 @@ }

React.createElement("h3", null,
"Asynchronous data loading: (e.g. fetch) - ",
React.createElement("button", { onClick: this.setData }, "Set Data")),
"Asynchronous data: (e.g. fetch) - ",
React.createElement("button", { onClick: this.setData }, "Set Data"),
' ',
React.createElement("button", { onClick: this.clearData }, "Clear")),
React.createElement(ReactTabulator_1["default"], { columns: columns, data: this.state.data }),

@@ -84,0 +89,0 @@ React.createElement("h3", null, "Editable Table"),

{
"name": "react-tabulator",
"version": "0.5.6",
"version": "0.5.8",
"description": "React Tabulator component",

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

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