From 97ed2e452597d5f1f2e8d0abfc06e94b4aa5d448 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Tue, 30 Apr 2019 22:03:30 -0400 Subject: fixed template button --- src/client/views/nodes/LinkBox.tsx | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'src/client/views/nodes') diff --git a/src/client/views/nodes/LinkBox.tsx b/src/client/views/nodes/LinkBox.tsx index 89c06e7b3..8f979fdd7 100644 --- a/src/client/views/nodes/LinkBox.tsx +++ b/src/client/views/nodes/LinkBox.tsx @@ -11,6 +11,7 @@ import { undoBatch } from "../../util/UndoManager"; import { CollectionDockingView } from "../collections/CollectionDockingView"; import './LinkBox.scss'; import React = require("react"); +import { runInAction } from 'mobx'; library.add(faEye); @@ -70,20 +71,22 @@ export class LinkBox extends React.Component { e.stopPropagation(); this.props.linkDoc.GetTAsync(KeyStore.LinkedFromDocs, Document, field => { if (field) { - field.GetTAsync>(KeyStore.LinkedToDocs, ListField, field => { - if (field) { - field.Data.splice(field.Data.indexOf(this.props.linkDoc)); - } - }); + field.GetTAsync>(KeyStore.LinkedToDocs, ListField, field => + runInAction(() => { + if (field) { + field.Data.splice(field.Data.indexOf(this.props.linkDoc)); + } + })); } }); this.props.linkDoc.GetTAsync(KeyStore.LinkedToDocs, Document, field => { if (field) { - field.GetTAsync>(KeyStore.LinkedFromDocs, ListField, field => { - if (field) { - field.Data.splice(field.Data.indexOf(this.props.linkDoc)); - } - }); + field.GetTAsync>(KeyStore.LinkedFromDocs, ListField, field => + runInAction(() => { + if (field) { + field.Data.splice(field.Data.indexOf(this.props.linkDoc)); + } + })); } }); } -- cgit v1.2.3-70-g09d2