diff options
| author | mehekj <mehek.jethani@gmail.com> | 2023-03-06 17:54:29 -0500 |
|---|---|---|
| committer | mehekj <mehek.jethani@gmail.com> | 2023-03-06 17:54:29 -0500 |
| commit | 1d07b09c90861d002139a0232e5aa1c1eba5e114 (patch) | |
| tree | b0cbe99896f393c47eeb680764eba632f4d9eded /src/client/views/PropertiesDocBacklinksSelector.tsx | |
| parent | b55a757175051457c9260f80a1de937901f5cfff (diff) | |
| parent | 4c2584baf8bae0cde714c832b0768d3c08864422 (diff) | |
Merge branch 'master' into schema-mehek
Diffstat (limited to 'src/client/views/PropertiesDocBacklinksSelector.tsx')
| -rw-r--r-- | src/client/views/PropertiesDocBacklinksSelector.tsx | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/client/views/PropertiesDocBacklinksSelector.tsx b/src/client/views/PropertiesDocBacklinksSelector.tsx index f7173a593..00c3400cb 100644 --- a/src/client/views/PropertiesDocBacklinksSelector.tsx +++ b/src/client/views/PropertiesDocBacklinksSelector.tsx @@ -1,7 +1,6 @@ -import { computed } from 'mobx'; import { observer } from 'mobx-react'; import * as React from 'react'; -import { Doc, DocListCast } from '../../fields/Doc'; +import { Doc } from '../../fields/Doc'; import { Cast } from '../../fields/Types'; import { DocumentType } from '../documents/DocumentTypes'; import { LinkManager } from '../util/LinkManager'; @@ -19,20 +18,6 @@ type PropertiesDocBacklinksSelectorProps = { @observer export class PropertiesDocBacklinksSelector extends React.Component<PropertiesDocBacklinksSelectorProps> { - @computed get _docs() { - const linkSource = this.props.Document; - const links = DocListCast(linkSource.links); - const collectedLinks = [] as Doc[]; - links.map(link => { - const other = LinkManager.getOppositeAnchor(link, linkSource); - const otherdoc = !other ? undefined : other.annotationOn && other.type !== DocumentType.RTF ? Cast(other.annotationOn, Doc, null) : other; - if (otherdoc && !collectedLinks.some(d => Doc.AreProtosEqual(d, otherdoc))) { - collectedLinks.push(otherdoc); - } - }); - return collectedLinks; - } - getOnClick = (link: Doc) => { const linkSource = this.props.Document; const other = LinkManager.getOppositeAnchor(link, linkSource); |
