Skip to content

Commit

Permalink
fix: broken rowSelectionChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
ngduc committed Sep 22, 2020
1 parent c2a7910 commit 3db6aec
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
## [0.14.0] - 2020-09-20
## [0.14.1] - 2020-09-21
- added cross-env for Windows dev env.
- fixed undefined this.table in componentDidMount.
- upgraded tabulator to 4.8.1
- fixed: broken rowSelectionChanged

## [0.13.2] - 2020-07-18
- upgraded tabulator to 4.7.2
Expand Down
2 changes: 1 addition & 1 deletion lib/ConfigUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ exports.propsToOptions = function (props) { return __awaiter(void 0, void 0, voi
'groupVisibilityChanged', 'groupClick', 'groupDblClick', 'groupContext', 'groupTap', 'groupDblTap', 'groupTapHold',
'movableRowsSendingStart', 'movableRowsSent', 'movableRowsSentFailed', 'movableRowsSendingStop', 'movableRowsReceivingStart', 'movableRowsReceived', 'movableRowsReceivedFailed', 'movableRowsReceivingStop',
'validationFailed', 'clipboardCopied', 'clipboardPasted', 'clipboardPasteError',
'downloadReady', 'downloadComplete', 'selectableCheck'];
'downloadReady', 'downloadComplete'];
for (_a = 0, callbackNames_1 = callbackNames; _a < callbackNames_1.length; _a++) {
callbackName = callbackNames_1[_a];
output[callbackName] = props[callbackName] || NOOPS;
Expand Down
4 changes: 2 additions & 2 deletions lib/ReactTabulatorExample.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ var default_1 = /** @class */ (function (_super) {
};
return (React.createElement("div", null,
React.createElement(ReactTabulator_1["default"], { ref: function (ref) { return (_this.ref = ref); }, columns: columns, data: data, rowClick: this.rowClick, options: options, "data-custom-attr": "test-custom-attribute", className: "custom-css-class" }),
React.createElement("div", null,
React.createElement("i", null,
"Selected Name: ",
this.state.selectedName),
React.createElement("strong", null, this.state.selectedName)),
React.createElement("h3", null,
"Asynchronous data: (e.g. fetch) - ",
React.createElement("button", { onClick: this.setData }, "Set Data"),
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-tabulator",
"version": "0.14.0",
"version": "0.14.1",
"description": "React Tabulator is based on tabulator - a JS table library with many advanced features.",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down Expand Up @@ -46,7 +46,7 @@
"es6-promise": "^4.2.8",
"pick-react-known-prop": "^0.1.5",
"react-tag-autocomplete": "^5.7.1",
"tabulator-tables": "^4.8.1"
"tabulator-tables": "4.8.1"
},
"peerDependencies": {
"react": ">=15.6.2 || ^16.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/ConfigUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export const propsToOptions = async (props: any) => {
'groupVisibilityChanged','groupClick','groupDblClick','groupContext','groupTap','groupDblTap','groupTapHold',
'movableRowsSendingStart','movableRowsSent','movableRowsSentFailed','movableRowsSendingStop','movableRowsReceivingStart','movableRowsReceived','movableRowsReceivedFailed','movableRowsReceivingStop',
'validationFailed','clipboardCopied','clipboardPasted','clipboardPasteError',
'downloadReady','downloadComplete', 'selectableCheck'];
'downloadReady','downloadComplete']; // don't add "selectableCheck" here, it will break "rowSelectionChanged"

for (const callbackName of callbackNames) {
output[callbackName] = props[callbackName] || NOOPS
Expand Down
4 changes: 3 additions & 1 deletion src/ReactTabulatorExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ export default class extends React.Component<IProps> {
data-custom-attr="test-custom-attribute"
className="custom-css-class"
/>
<div>Selected Name: {this.state.selectedName}</div>
<i>
Selected Name: <strong>{this.state.selectedName}</strong>
</i>

<h3>
Asynchronous data: (e.g. fetch) - <button onClick={this.setData}>Set Data</button>{' '}
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8529,7 +8529,7 @@ symbol-tree@^3.2.2:
version "3.2.2"
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6"

tabulator-tables@^4.8.1:
[email protected]:
version "4.8.1"
resolved "https://registry.yarnpkg.com/tabulator-tables/-/tabulator-tables-4.8.1.tgz#4e2aeb3f2ae8dde37c3740603da64018b39fa1b7"
integrity sha512-4+mX2GWyDALOzFxe38oYtMSb0XZp6TxP/kscf4M1AwG3+P05S+0oiSqNeTRNSRceL+4YeQhxSzoBsWCim9FFMg==
Expand Down

0 comments on commit 3db6aec

Please sign in to comment.