aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/CollectionSchemaCells.tsx9
-rw-r--r--src/client/views/collections/CollectionSchemaHeaders.tsx10
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx24
-rw-r--r--src/client/views/collections/CollectionSubView.tsx3
4 files changed, 9 insertions, 37 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx
index e50f95dca..ecd20eb06 100644
--- a/src/client/views/collections/CollectionSchemaCells.tsx
+++ b/src/client/views/collections/CollectionSchemaCells.tsx
@@ -32,7 +32,6 @@ 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);
@@ -292,9 +291,6 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
maxHeight={Number(MAX_ROW_HEIGHT)}
placeholder={"enter value"}
bing={() => {
- // if (type === "number" && (contents === 0 || contents === "0")) {
- // return "0";
- // } else {
const cfield = ComputedField.WithoutComputed(() => FieldValue(props.Document[props.fieldKey]));
if (cfield !== undefined) {
if (cfield.Text !== undefined) {
@@ -307,11 +303,6 @@ export class CollectionSchemaCell extends React.Component<CellProps> {
return String(NumCast(cfield));
}
}
- // console.log(cfield.Text);
- // console.log(StrCast(cfield));
- // return StrCast(cfield);
- // }
-
}}
GetValue={() => {
if (type === "number" && (contents === 0 || contents === "0")) {
diff --git a/src/client/views/collections/CollectionSchemaHeaders.tsx b/src/client/views/collections/CollectionSchemaHeaders.tsx
index a979f9838..5d7ab2c61 100644
--- a/src/client/views/collections/CollectionSchemaHeaders.tsx
+++ b/src/client/views/collections/CollectionSchemaHeaders.tsx
@@ -78,14 +78,6 @@ export class CollectionSchemaAddColumnHeader extends React.Component<AddColumnHe
-
-
-
-
-
-
-
-
export interface ColumnMenuProps {
columnField: SchemaHeaderField;
// keyValue: string;
@@ -330,8 +322,6 @@ export class KeysDropdown extends React.Component<KeysDropdownProps> {
@undoBatch
onKeyDown = (e: React.KeyboardEvent): void => {
- //if (this._key !==)
-
if (e.key === "Enter") {
const keyOptions = this._searchTerm === "" ? this.props.possibleKeys : this.props.possibleKeys.filter(key => key.toUpperCase().indexOf(this._searchTerm.toUpperCase()) > -1);
if (keyOptions.length) {
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index b93a7f7b8..869be2b03 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -4,27 +4,26 @@ import { faCog, faPlus, faSortDown, faSortUp, faTable } from '@fortawesome/free-
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { action, computed, observable, untracked } from "mobx";
import { observer } from "mobx-react";
+import Measure from "react-measure";
import { Resize } from "react-table";
import "react-table/react-table.css";
-import { Doc, DocCastAsync } from "../../../fields/Doc";
+import { Doc } from "../../../fields/Doc";
import { List } from "../../../fields/List";
import { listSpec } from "../../../fields/Schema";
-import { SchemaHeaderField, PastelSchemaPalette } from "../../../fields/SchemaHeaderField";
-import { Cast, NumCast, StrCast } from "../../../fields/Types";
-import { Docs, DocumentOptions } from "../../documents/Documents";
+import { PastelSchemaPalette, SchemaHeaderField } from "../../../fields/SchemaHeaderField";
+import { Cast, NumCast } from "../../../fields/Types";
+import { TraceMobx } from "../../../fields/util";
+import { emptyFunction, returnFalse, returnOne, returnZero, setupMoveUpEvents } from "../../../Utils";
+import { SnappingManager } from "../../util/SnappingManager";
import { Transform } from "../../util/Transform";
import { undoBatch } from "../../util/UndoManager";
import { COLLECTION_BORDER_WIDTH } from '../../views/globalCssVariables.scss';
import '../DocumentDecorations.scss';
+import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView";
import { KeysDropdown } from "./CollectionSchemaHeaders";
import "./CollectionSchemaView.scss";
import { CollectionSubView } from "./CollectionSubView";
-import { ContentFittingDocumentView } from "../nodes/ContentFittingDocumentView";
-import { setupMoveUpEvents, emptyFunction, returnZero, returnOne, returnFalse } from "../../../Utils";
-import { SnappingManager } from "../../util/SnappingManager";
-import Measure from "react-measure";
import { SchemaTable } from "./SchemaTable";
-import { TraceMobx } from "../../../fields/util";
library.add(faCog, faPlus, faSortUp, faSortDown);
library.add(faTable);
@@ -170,9 +169,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
@action
setColumnSort = (columnField: SchemaHeaderField, descending: boolean | undefined) => {
const columns = this.columns;
- columns.forEach(col => {
- col.setDesc(undefined);
- })
+ columns.forEach(col => col.setDesc(undefined));
const index = columns.findIndex(c => c.heading === columnField.heading);
const column = columns[index];
@@ -330,8 +327,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
columns[index] = column;
this.columns = columns;
if (filter) {
- console.log(newKey);
- console.log(filter);
Doc.setDocFilter(this.props.Document, newKey, filter, "match");
if (this.props.Document.selectedDoc !== undefined) {
let doc = Cast(this.props.Document.selectedDoc, Doc) as Doc;
@@ -462,7 +457,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
this.props.select(false);
}
}
- console.log("yeeeet");
}
@computed
diff --git a/src/client/views/collections/CollectionSubView.tsx b/src/client/views/collections/CollectionSubView.tsx
index ab28e1904..88241f519 100644
--- a/src/client/views/collections/CollectionSubView.tsx
+++ b/src/client/views/collections/CollectionSubView.tsx
@@ -130,10 +130,7 @@ export function CollectionSubView<T, X>(schemaCtor: (doc: Doc) => T, moreProps?:
let childDocs = viewSpecScript ? docs.filter(d => viewSpecScript.script.run({ doc: d }, console.log).result) : docs;
const searchDocs = DocListCast(this.props.Document._searchDocs);
- console.log(this.props.Document);
- console.log(searchDocs);
if (searchDocs !== undefined && searchDocs.length > 0) {
- console.log("yes");
childDocs = searchDocs;
}
const docFilters = this.docFilters();