diff options
| author | eeng5 <eleanor_eng@brown.edu> | 2020-02-09 14:59:57 -0500 |
|---|---|---|
| committer | eeng5 <eleanor_eng@brown.edu> | 2020-02-09 14:59:57 -0500 |
| commit | daa8898f70bd44d2716f1f0d3371a8435a3ff638 (patch) | |
| tree | ccb2ea544eeed0413370cdd69e758faec6170690 /src/client/views/collections/CollectionSchemaCells.tsx | |
| parent | 1e36055e3674fe33dd39f6ad79c969531f7b447c (diff) | |
| parent | f6179334d6f2942631caa17b7c8ae2531d87c7c4 (diff) | |
Merge branch 'pen' of https://github.com/browngraphicslab/Dash-Web into 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 caffa7eb1..4eba5dc26 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); @@ -82,10 +83,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); |
