diff options
| author | Stanley Yip <33562077+yipstanley@users.noreply.github.com> | 2020-02-29 14:20:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-29 14:20:01 -0500 |
| commit | bb2f6955bef4f079c0fa7213e80fde7a76847799 (patch) | |
| tree | ef5e70925b8cdeb8229af849e33e6f3a4cceae7f /src/client/views/collections/CollectionSchemaCells.tsx | |
| parent | 640f14da28d97600fb32d09023fc932e3a4052c4 (diff) | |
| parent | 2f6e27c67d1790d4350eede3003f0b614460f4d1 (diff) | |
Merge pull request #343 from browngraphicslab/pen
Pen
Diffstat (limited to 'src/client/views/collections/CollectionSchemaCells.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSchemaCells.tsx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index facde3648..df7abad61 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -23,6 +23,7 @@ import { faExpand } from '@fortawesome/free-solid-svg-icons'; import { SchemaHeaderField } from "../../../new_fields/SchemaHeaderField"; import { KeyCodes } from "../../northstar/utils/KeyCodes"; import { undoBatch } from "../../util/UndoManager"; +import { List } from "lodash"; library.add(faExpand); @@ -83,10 +84,20 @@ export class CollectionSchemaCell extends React.Component<CellProps> { } @action - onPointerDown = (e: React.PointerEvent): void => { + onPointerDown = async (e: React.PointerEvent): Promise<void> => { this.props.changeFocusedCellByIndex(this.props.row, this.props.col); this.props.setPreviewDoc(this.props.rowProps.original); + let url: string; + if (url = StrCast(this.props.rowProps.row.href)) { + try { + new URL(url); + const temp = window.open(url)!; + temp.blur(); + window.focus(); + } catch { } + } + // this._isEditing = true; // this.props.setIsEditing(true); |
