aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/EquationBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/EquationBox.tsx')
-rw-r--r--src/client/views/nodes/EquationBox.tsx6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/views/nodes/EquationBox.tsx b/src/client/views/nodes/EquationBox.tsx
index f49405d02..9111cb418 100644
--- a/src/client/views/nodes/EquationBox.tsx
+++ b/src/client/views/nodes/EquationBox.tsx
@@ -32,6 +32,12 @@ export class EquationBox extends ViewBoxBaseComponent<FieldViewProps, EquationDo
this._ref.current!.mathField.focus();
this._ref.current!.mathField.select();
}
+ reaction(() => StrCast(this.dataDoc.text),
+ text => {
+ if (text && text !== this._ref.current!.mathField.latex()) {
+ this._ref.current!.mathField.latex(text);
+ }
+ });
reaction(() => this.props.isSelected(),
selected => {
if (this._ref.current) {