From d6a4516b58e4190dbbd05c9c085a897dda9cb867 Mon Sep 17 00:00:00 2001 From: Daniil Konoplev Date: Fri, 3 Oct 2025 12:22:34 +0300 Subject: [PATCH 1/2] feat: make the library compatible with React 19 --- package.json | 2 +- src/PivotTableUI.jsx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f4adaf6e..68f4f220 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "dependencies": { "immutability-helper": "^2.3.1", "prop-types": "^15.5.10", - "react-draggable": "^3.0.3", + "react-draggable": "^4.5.0", "react-sortablejs": "^1.3.4", "sortablejs": "^1.6.1" }, diff --git a/src/PivotTableUI.jsx b/src/PivotTableUI.jsx index 0de055f4..ad88db50 100644 --- a/src/PivotTableUI.jsx +++ b/src/PivotTableUI.jsx @@ -13,6 +13,7 @@ export class DraggableAttribute extends React.Component { constructor(props) { super(props); this.state = {open: false, filterText: ''}; + this.nodeRef = React.createRef(); } toggleValue(value) { @@ -48,8 +49,9 @@ export class DraggableAttribute extends React.Component { .sort(this.props.sorter); return ( - +
Date: Fri, 3 Oct 2025 12:28:21 +0300 Subject: [PATCH 2/2] chore: add the prepare step --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 68f4f220..10e9fc51 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "test:jest": "jest", "test": "npm run test:eslint && npm run test:prettier && npm run test:jest", "clean": "rm -rf __tests__ PivotTable.js* PivotTableUI.js* PlotlyRenderers.js* TableRenderers.js* Utilities.js* pivottable.css", + "prepare": "npm run build", "build": "npm run clean && cp src/pivottable.css . && babel src --out-dir=. --source-maps --presets=env,react --plugins babel-plugin-add-module-exports", "doPublish": "npm run build && npm publish", "postpublish": "npm run clean",