aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaCells.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-08-22 14:21:41 -0400
committerbobzel <zzzman@gmail.com>2020-08-22 14:21:41 -0400
commit88b06945c8a1fcb7bc518de878a4894de70dda94 (patch)
treee04d29ae0f68b042b4b6f2bcd9bd506b2e970d70 /src/client/views/collections/CollectionSchemaCells.tsx
parent4ed30f48bd0c87f0a5ccb484d78bf4601ab6ff74 (diff)
major overhaul of search to avoid writing anything to filtered documents and to make the UI work properly.
Diffstat (limited to 'src/client/views/collections/CollectionSchemaCells.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaCells.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx
index 4bd69041b..2f1f7a90f 100644
--- a/src/client/views/collections/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/CollectionSchemaCells.tsx
@@ -229,7 +229,7 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
const fieldIsDoc = (type === "document" && typeof field === "object") || (typeof field === "object" && doc);
const onItemDown = async (e: React.PointerEvent) => {
- if (this.props.Document._searchDoc !== undefined) {
+ if (this.props.Document._searchDoc) {
const doc = Doc.GetProto(this.props.rowProps.original);
const aliasdoc = await SearchUtil.GetAliasesOfDocument(doc);
let targetContext = undefined;
@@ -315,7 +315,7 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
}
}
let search = false;
- if (this.props.Document._searchDoc !== undefined) {
+ if (this.props.Document._searchDoc) {
search = true;
}
@@ -900,7 +900,7 @@ export class CollectionSchemaButtons extends CollectionSchemaCell {
// (!this.props.CollectionView || !this.props.CollectionView.props.isSelected() ? undefined :
// SetupDrag(reference, () => this._document, this.props.moveDocument, this.props.Document.schemaDoc ? "copy" : undefined)(e));
// };
- return !BoolCast(this.props.Document._searchDoc) ? <></>
+ return !this.props.Document._searchDoc ? <></>
: [DocumentType.PDF, DocumentType.RTF].includes(StrCast(doc.type) as DocumentType) ?
<div style={{ paddingTop: 8, paddingLeft: 3, }} >
<button style={{ padding: 2, left: 77 }} onClick={() => searchMatch(true)}>