aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionSchemaCells.tsx5
-rw-r--r--src/client/views/search/SearchBox.tsx7
2 files changed, 5 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx
index 98b7b7739..f627faa63 100644
--- a/src/client/views/collections/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/CollectionSchemaCells.tsx
@@ -243,7 +243,7 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
// </div>
// );
const positions = [];
- if (StrCast(this.props.Document._searchString) !== "") {
+ if (StrCast(this.props.Document._searchString).toLowerCase() !== "") {
const cfield = ComputedField.WithoutComputed(() => FieldValue(props.Document[props.fieldKey]));
let term = "";
if (cfield !== undefined) {
@@ -257,7 +257,8 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
term = String(NumCast(cfield));
}
}
- const search = StrCast(this.props.Document._searchString);
+ term = term.toLowerCase();
+ const search = StrCast(this.props.Document._searchString).toLowerCase();
let start = term.indexOf(search);
let tally = 0;
if (start !== -1) {
diff --git a/src/client/views/search/SearchBox.tsx b/src/client/views/search/SearchBox.tsx
index 812658b32..1e44a379b 100644
--- a/src/client/views/search/SearchBox.tsx
+++ b/src/client/views/search/SearchBox.tsx
@@ -298,7 +298,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
searchCollection(query: string) {
const selectedCollection: DocumentView = SelectionManager.SelectedDocuments()[0];
-
+ query = query.toLowerCase();
if (selectedCollection !== undefined) {
this.currentSelectedCollection = selectedCollection;
if (this.filter === true) {
@@ -319,7 +319,7 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
const protos = Doc.GetAllPrototypes(d);
protos.forEach(proto => {
Object.keys(proto).forEach(key => {
- if (StrCast(d[key]).includes(query) && !hlights.includes(key)) {
+ if (StrCast(d[key]).toLowerCase().includes(query) && !hlights.includes(key)) {
hlights.push(key);
}
});
@@ -762,9 +762,6 @@ export class SearchBox extends ViewBoxBaseComponent<FieldViewProps, SearchBoxDoc
return (
<div style={{ pointerEvents: "all" }} className="searchBox-container">
<div className="searchBox-bar">
- {/* <span className="searchBox-barChild searchBox-collection" onPointerDown={SetupDrag(this.collectionRef, () => StrCast(this.layoutDoc._searchString) ? this.startDragCollection() : undefined)} ref={this.collectionRef} title="Drag Results as Collection">
- <FontAwesomeIcon icon="object-group" size="lg" />
- </span> */}
<div style={{ position: "absolute", left: 15 }}>{Doc.CurrentUserEmail}</div>
<div style={{ display: "flex", alignItems: "center" }}>
<FontAwesomeIcon onPointerDown={SetupDrag(this.collectionRef, () => StrCast(this.layoutDoc._searchString) ? this.startDragCollection() : undefined)} icon={"search"} size="lg"