diff options
| author | bobzel <zzzman@gmail.com> | 2024-01-27 04:21:08 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-01-27 04:21:08 -0500 |
| commit | e3709b4445732791f696cdf26274ab09294ce208 (patch) | |
| tree | 2c1b0e51b3609e6284f499e3a3a851dd8b26da58 /src/client/views/EditableView.tsx | |
| parent | cdbe62da5c62f809629f4e8b01524b223f38abd4 (diff) | |
made dataViz nodes linked to schema nodes update automatically as cahnges are made. fixed user created templates from disappearing from menu, and made them work. added toJavascriptString and made DashField views convert to text. added support for turning text into javascript rendering (paint) code.
Diffstat (limited to 'src/client/views/EditableView.tsx')
| -rw-r--r-- | src/client/views/EditableView.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/EditableView.tsx b/src/client/views/EditableView.tsx index c6666d79d..4508d00a7 100644 --- a/src/client/views/EditableView.tsx +++ b/src/client/views/EditableView.tsx @@ -1,4 +1,4 @@ -import { action, IReactionDisposer, makeObservable, observable, reaction } from 'mobx'; +import { action, IReactionDisposer, makeObservable, observable, reaction, runInAction } from 'mobx'; import { observer } from 'mobx-react'; import * as React from 'react'; import * as Autosuggest from 'react-autosuggest'; @@ -97,9 +97,10 @@ export class EditableView extends ObservableReactComponent<EditableProps> { super.componentDidUpdate(prevProps); if (this._editing && this._props.editing === false) { this._inputref?.value && this.finalizeEdit(this._inputref.value, false, true, false); - } else if (this._props.editing !== undefined) { - this._editing = this._props.editing; - } + } else + runInAction(() => { + if (this._props.editing !== undefined) this._editing = this._props.editing; + }); } componentWillUnmount() { |
