react-tabulator
Advanced tools
Comparing version 0.4.5 to 0.4.7
@@ -0,1 +1,6 @@ | ||
## [0.4.7] - 2018-10-13 | ||
### Changed | ||
- switch to jest-puppeteer because enzyme couldn't render tabulator data. (got empty grid) | ||
## [0.4.5] - 2018-10-11 | ||
@@ -2,0 +7,0 @@ |
@@ -6,3 +6,3 @@ "use strict"; | ||
// get callbacks from props (default: NOOP) & set them to Tabulator options | ||
exports.getCallbacks = function (props) { | ||
exports.propsToOptions = function (props) { | ||
var output = {}; | ||
@@ -9,0 +9,0 @@ var defaultOptions = ['height', 'layout', 'layoutColumnsOnNewData', 'columnMinWidth', 'columnVertAlign', |
@@ -52,4 +52,4 @@ "use strict"; | ||
var _a = this.props, columns = _a.columns, data = _a.data, options = _a.options; | ||
var callbacks = ConfigUtils_1.getCallbacks(this.props); | ||
var table = new Tabulator(domEle, __assign({ columns: columns }, callbacks, { layout: 'fitColumns', // fit columns to width of table (optional) | ||
var propOptions = ConfigUtils_1.propsToOptions(this.props); | ||
new Tabulator(domEle, __assign({ columns: columns }, propOptions, { layout: 'fitColumns', // fit columns to width of table (optional) | ||
tableBuilding: function () { | ||
@@ -60,4 +60,7 @@ that.table = this; // keep table instance | ||
} | ||
} }, options)); | ||
table.setData(data); | ||
}, | ||
dataLoaded: function () { | ||
that.props.dataLoaded ? that.props.dataLoaded() : ''; | ||
} }, options, { data: data })); | ||
// await table.setData(data); | ||
}; | ||
@@ -64,0 +67,0 @@ default_1.prototype.componentWillUnmount = function () { |
{ | ||
"name": "react-tabulator", | ||
"version": "0.4.5", | ||
"version": "0.4.7", | ||
"description": "React Tabulator component", | ||
@@ -21,3 +21,3 @@ "main": "lib/index.js", | ||
"dev:watch": "tsc --outDir ./lib --jsx react --watch ./src/index.tsx", | ||
"test": "NODE_ENV=test jest --config=./jest-config.js --verbose", | ||
"test": "NODE_ENV=test HEADLESS=true jest --config=./jest-config.js --verbose", | ||
"test:coverage": "nwb test-react --coverage", | ||
@@ -59,4 +59,7 @@ "test:watch": "nwb test-react --server", | ||
"enzyme-adapter-react-16": "^1.6.0", | ||
"faker": "^4.1.0", | ||
"jest": "^23.6.0", | ||
"jest-puppeteer": "^3.4.0", | ||
"nwb": "0.23.x", | ||
"puppeteer": "^1.9.0", | ||
"react": "^16.5.2", | ||
@@ -63,0 +66,0 @@ "react-dom": "^16.5.2", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29128
720
20