@neo4j-cypher/react-codemirror 2.0.0-next.2 → 2.0.0-next.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/index.cjs +2 -1
- package/dist/cjs/index.cjs.map +2 -2
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/index.mjs.map +2 -2
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/CypherEditor.tsx +7 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -1429,7 +1429,8 @@ var CypherEditor = class extends Component {
|
|
|
1429
1429
|
)
|
|
1430
1430
|
});
|
|
1431
1431
|
}
|
|
1432
|
-
|
|
1432
|
+
const didChangeHistoryEstimate = prevProps.history?.length !== this.props.history?.length || prevProps.history?.[0] !== this.props.history?.[0];
|
|
1433
|
+
if (didChangeHistoryEstimate) {
|
|
1433
1434
|
this.editorView.current.dispatch({
|
|
1434
1435
|
effects: replaceHistory.of(this.props.history ?? [])
|
|
1435
1436
|
});
|