diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-06-30 02:21:31 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-06-30 02:21:31 -0400 |
commit | eb8399d057089a7b90d756fc69df096becad9a7f (patch) | |
tree | 147fd644d31439ddfad67c55c720e87c3a870241 /src/client/views/collections/CollectionSubView.tsx | |
parent | 6a75dac53b9fab5b96f2cce4937b59f1e29928f9 (diff) |
added heuristic to filters to identify text fields based on being RTF or having multiple words. fixed text box padding when used as filter input. fixed selection of items in sidebar when RichTextMenu is pinned.
Diffstat (limited to 'src/client/views/collections/CollectionSubView.tsx')
-rw-r--r-- | src/client/views/collections/CollectionSubView.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx index b76859d90..f39c1ae28 100644 --- a/src/client/views/collections/CollectionSubView.tsx +++ b/src/client/views/collections/CollectionSubView.tsx @@ -1,7 +1,7 @@ import { action, computed, IReactionDisposer, reaction } from "mobx"; import { basename } from 'path'; import CursorField from "../../../fields/CursorField"; -import { Doc, Opt } from "../../../fields/Doc"; +import { Doc, Opt, Field } from "../../../fields/Doc"; import { Id } from "../../../fields/FieldSymbols"; import { List } from "../../../fields/List"; import { listSpec } from "../../../fields/Schema"; @@ -138,7 +138,7 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?: const facet = filterFacets[facetKey]; const satisfiesFacet = Object.keys(facet).some(value => { if (facet[value] === "match") { - return d[facetKey] === undefined || Cast(d[facetKey], RichTextField)?.Text.includes(value); + return d[facetKey] === undefined || Field.toString(d[facetKey] as Field).includes(value); } return (facet[value] === "x") !== Doc.matchFieldValue(d, facetKey, value); }); @@ -475,5 +475,5 @@ import { CurrentUserUtils } from "../../util/CurrentUserUtils"; import { DocumentType } from "../../documents/DocumentTypes"; import { FormattedTextBox, GoogleRef } from "../nodes/formattedText/FormattedTextBox"; import { CollectionView } from "./CollectionView"; -import { SelectionManager } from "../../util/SelectionManager"; import { RichTextField } from "../../../fields/RichTextField"; +import { SelectionManager } from "../../util/SelectionManager"; |