diff options
| author | bobzel <zzzman@gmail.com> | 2024-10-10 18:58:39 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-10-10 18:58:39 -0400 |
| commit | 5752dff8ff7b1b2858542feec0b1bb037461bf1a (patch) | |
| tree | 04080d4a596b0e5199b5ec95ab625fbb590f2a75 /src/client/views/collections/CollectionNoteTakingViewColumn.tsx | |
| parent | 36735ff00a55ae587af5f69eef495533a1f35393 (diff) | |
| parent | d347fc59feefd91a796012892da57511787bb6d0 (diff) | |
Merge branch 'master' into nathan-starter
Diffstat (limited to 'src/client/views/collections/CollectionNoteTakingViewColumn.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionNoteTakingViewColumn.tsx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingViewColumn.tsx b/src/client/views/collections/CollectionNoteTakingViewColumn.tsx index 8c6a6b551..226d06f37 100644 --- a/src/client/views/collections/CollectionNoteTakingViewColumn.tsx +++ b/src/client/views/collections/CollectionNoteTakingViewColumn.tsx @@ -1,5 +1,5 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { action, computed, makeObservable, observable } from 'mobx'; +import { action, computed, makeObservable, observable, runInAction } from 'mobx'; import { observer } from 'mobx-react'; import * as React from 'react'; import { lightOrDark, returnEmptyString } from '../../../ClientUtils'; @@ -87,12 +87,16 @@ export class CollectionNoteTakingViewColumn extends ObservableReactComponent<CSV }; componentDidMount(): void { - this._ele && this.props.refList.push(this._ele); + runInAction(() => { + this._ele && this.props.refList.push(this._ele); + }); } componentWillUnmount() { - this._ele && this.props.refList.splice(this._props.refList.indexOf(this._ele), 1); - this._ele = null; + runInAction(() => { + this._ele && this.props.refList.splice(this._props.refList.indexOf(this._ele), 1); + this._ele = null; + }); } @undoBatch @@ -248,10 +252,7 @@ export class CollectionNoteTakingViewColumn extends ObservableReactComponent<CSV <EditableView GetValue={returnEmptyString} SetValue={this.addNewTextDoc} textCallback={this.addTextNote} placeholder={"Type ':' for commands"} contents="+ Node" menuCallback={this.menuCallback} /> </div> <div className="collectionNoteTakingView-addDocumentButton" style={{ color: lightOrDark(this._props.backgroundColor?.()) }}> - { - // eslint-disable-next-line react/jsx-props-no-spreading - <EditableView {...this._props.editableViewProps()} /> - } + <EditableView {...this._props.editableViewProps()} /> </div> </div> ) : null} |
