aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaCells.tsx
diff options
context:
space:
mode:
authorAndy Rickert <andrew_rickert@brown.edu>2020-07-08 23:23:51 -0400
committerAndy Rickert <andrew_rickert@brown.edu>2020-07-08 23:23:51 -0400
commitacf3830b77f8da19330d11d449cbf1712aa30c23 (patch)
tree276a4839b7a7d91011c3a90aa787b1f863f1b62c /src/client/views/collections/CollectionSchemaCells.tsx
parent20bf67a41b16dd4df42e7dfc93e9acc38e910d29 (diff)
highlighting search results in schema
Diffstat (limited to 'src/client/views/collections/CollectionSchemaCells.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaCells.tsx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx
index 0008cfad3..5a84408f7 100644
--- a/src/client/views/collections/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/CollectionSchemaCells.tsx
@@ -32,6 +32,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import DatePicker from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
import { DateField } from "../../../fields/DateField";
+import { indexOf } from "lodash";
const path = require('path');
library.add(faExpand);
@@ -244,14 +245,17 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
// );
trace();
+ if (type === "string") {
+ let search = StrCast(this.props.Document._searchString)
+ let start = contents.indexOf(search);
+ console.log(contents.slice(start, search.length));
+ }
-
+ StrCast(this.props.Document._searchString) ? console.log(StrCast(this.props.Document._searchString)) : undefined;
return (
<div className="collectionSchemaView-cellContainer" style={{ cursor: fieldIsDoc ? "grab" : "auto" }} ref={dragRef} onPointerDown={this.onPointerDown} onPointerEnter={onPointerEnter} onPointerLeave={onPointerLeave}>
<div className={className} ref={this._focusRef} onPointerDown={onItemDown} tabIndex={-1}>
<div className="collectionSchemaView-cellContents" ref={type === undefined || type === "document" ? this.dropRef : null} key={props.Document[Id]}>
-
-
<EditableView
editing={this._isEditing}
isEditingCallback={this.isEditingCallback}