From 05eadafec8b9d722023f691dd4b6ef96fcd73b8a Mon Sep 17 00:00:00 2001 From: Dallas Fraser Date: Thu, 23 Oct 2025 09:23:51 -0400 Subject: [PATCH] fix(issue-324): Re-hydrate the controlled component --- .ts/index.js | 1 + index.js | 1 + src/index.tsx | 1 + 3 files changed, 3 insertions(+) diff --git a/.ts/index.js b/.ts/index.js index 1c0350b..b075495 100644 --- a/.ts/index.js +++ b/.ts/index.js @@ -435,6 +435,7 @@ var Controlled = (function (_super) { if (this.props.editorWillUnmount) { this.props.editorWillUnmount(cm); } + this.hydrated = false; }; Controlled.prototype.shouldComponentUpdate = function (nextProps, nextState) { return !SERVER_RENDERED; diff --git a/index.js b/index.js index 4641dfe..8016a6e 100644 --- a/index.js +++ b/index.js @@ -454,6 +454,7 @@ var Controlled = function(_super) { if (this.props.editorWillUnmount) { this.props.editorWillUnmount(cm); } + this.hydrated = false; }; Controlled.prototype.shouldComponentUpdate = function(nextProps, nextState) { return !SERVER_RENDERED; diff --git a/src/index.tsx b/src/index.tsx index 435c5a4..c1eb49f 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -611,6 +611,7 @@ export class Controlled extends React.Component { if (this.props.editorWillUnmount) { this.props.editorWillUnmount(cm); } + this.hydrated = false; } /** @internal */