aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesDocBacklinksSelector.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-09-06 12:11:23 -0400
committerbobzel <zzzman@gmail.com>2023-09-06 12:11:23 -0400
commit530294ae0b4721f07ddbfdd584ed91ff07cdc5e3 (patch)
tree1e822db593a9340e83f7cd3fda62cebc9eea723e /src/client/views/PropertiesDocBacklinksSelector.tsx
parent0717311c89ad1dc98233623f223bf784f362115a (diff)
added undo for removing dashboards and add to recently closed. fixed link menu to open up link editor more direclty
Diffstat (limited to 'src/client/views/PropertiesDocBacklinksSelector.tsx')
-rw-r--r--src/client/views/PropertiesDocBacklinksSelector.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/PropertiesDocBacklinksSelector.tsx b/src/client/views/PropertiesDocBacklinksSelector.tsx
index 91a7b3da3..2d1e46361 100644
--- a/src/client/views/PropertiesDocBacklinksSelector.tsx
+++ b/src/client/views/PropertiesDocBacklinksSelector.tsx
@@ -1,3 +1,4 @@
+import { action } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
import { Doc } from '../../fields/Doc';
@@ -19,16 +20,16 @@ type PropertiesDocBacklinksSelectorProps = {
@observer
export class PropertiesDocBacklinksSelector extends React.Component<PropertiesDocBacklinksSelectorProps> {
- getOnClick = (link: Doc) => {
+ getOnClick = action((link: Doc) => {
const linkAnchor = this.props.Document;
const other = LinkManager.getOppositeAnchor(link, linkAnchor);
const otherdoc = !other ? undefined : other.annotationOn && other.type !== DocumentType.RTF ? Cast(other.annotationOn, Doc, null) : other;
-
+ LinkManager.currentLink = link;
if (otherdoc) {
otherdoc.hidden = false;
this.props.addDocTab(Doc.IsDataProto(otherdoc) ? Doc.MakeDelegate(otherdoc) : otherdoc, OpenWhere.toggleRight);
}
- };
+ });
render() {
return !SelectionManager.Views().length ? null : (