aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/search
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-01-23 16:11:42 -0500
committerbobzel <zzzman@gmail.com>2024-01-23 16:11:42 -0500
commitaf380979349308077e13fc12a2d09255b7f05f28 (patch)
tree79585221a23bccf2d352095b26bea99981ca92dc /src/client/views/search
parent001127c07f95173d7036db19d07dcfb1135f3caa (diff)
reorganization of DocumentView, DocumentViewInternal and FieldView methods and props. fix for selection bug after following a link. migrating to use [DocData] instad of GetProto()
Diffstat (limited to 'src/client/views/search')
-rw-r--r--src/client/views/search/SearchBox.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index 4d29573d4..5dc4f5550 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -3,7 +3,7 @@ import { action, computed, makeObservable, observable } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
import { Doc, DocListCastAsync, Field } from '../../../fields/Doc';
-import { DirectLinks } from '../../../fields/DocSymbols';
+import { DirectLinks, DocData } from '../../../fields/DocSymbols';
import { Id } from '../../../fields/FieldSymbols';
import { DocCast, StrCast } from '../../../fields/Types';
import { DocumentType } from '../../documents/DocumentTypes';
@@ -58,7 +58,7 @@ export class SearchBox extends ViewBoxBaseComponent<SearchBoxProps>() {
/**
* This is the constructor for the SearchBox class.
*/
- constructor(props: any) {
+ constructor(props: SearchBoxProps) {
super(props);
makeObservable(this);
SearchBox.Instance = this;
@@ -207,7 +207,7 @@ export class SearchBox extends ViewBoxBaseComponent<SearchBoxProps>() {
this._results.forEach((_, doc) => {
this._pageRanks.set(doc, 1.0 / this._results.size);
- if (Doc.GetProto(doc)[DirectLinks].size === 0) {
+ if (doc[DocData][DirectLinks].size === 0) {
this._linkedDocsOut.set(doc, new Set(this._results.keys()));
this._results.forEach((_, linkedDoc) => {
@@ -216,7 +216,7 @@ export class SearchBox extends ViewBoxBaseComponent<SearchBoxProps>() {
} else {
const linkedDocSet = new Set<Doc>();
- Doc.GetProto(doc)[DirectLinks].forEach(link => {
+ doc[DocData][DirectLinks].forEach(link => {
const d1 = link?.link_anchor_1 as Doc;
const d2 = link?.link_anchor_2 as Doc;
if (doc === d1 && this._results.has(d2)) {