diff options
| author | mehekj <mehek.jethani@gmail.com> | 2023-01-13 18:11:34 -0500 |
|---|---|---|
| committer | mehekj <mehek.jethani@gmail.com> | 2023-01-13 18:11:34 -0500 |
| commit | 82de335e0643f907e44cb193c9b2c6da1b3cbaf1 (patch) | |
| tree | e72a74f8b18bfd1e9d6f7262a0fb5203d82b6921 /src/client/views/collections/old_collectionSchema/OldCollectionSchemaCells.tsx | |
| parent | 73d3c63658c4bdf3268ea81a02eb96566869b855 (diff) | |
| parent | 6d32fe60ce32d650a2ba0d5eb8e36dccb591521f (diff) | |
Merge branch 'master' into schema-mehek
Diffstat (limited to 'src/client/views/collections/old_collectionSchema/OldCollectionSchemaCells.tsx')
| -rw-r--r-- | src/client/views/collections/old_collectionSchema/OldCollectionSchemaCells.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/views/collections/old_collectionSchema/OldCollectionSchemaCells.tsx b/src/client/views/collections/old_collectionSchema/OldCollectionSchemaCells.tsx index fb93d8b8e..97a6c5c18 100644 --- a/src/client/views/collections/old_collectionSchema/OldCollectionSchemaCells.tsx +++ b/src/client/views/collections/old_collectionSchema/OldCollectionSchemaCells.tsx @@ -30,6 +30,8 @@ import { DocumentIconContainer } from '../../nodes/DocumentIcon'; import { OverlayView } from '../../OverlayView'; import { CollectionView } from '../CollectionView'; import './CollectionSchemaView.scss'; +import { OpenWhere } from '../../nodes/DocumentView'; +import { PinProps } from '../../nodes/trails'; // intialize cell properties export interface CellProps { @@ -46,8 +48,8 @@ export interface CellProps { // currently unused renderDepth: number; // called when a button is pressed on the node itself - addDocTab: (document: Doc, where: string) => boolean; - pinToPres: (document: Doc) => void; + addDocTab: (document: Doc, where: OpenWhere) => boolean; + pinToPres: (document: Doc, pinProps: PinProps) => void; moveDocument?: (document: Doc | Doc[], targetCollection: Doc | undefined, addDocument: (document: Doc | Doc[]) => boolean) => boolean; isFocused: boolean; changeFocusedCellByIndex: (row: number, col: number) => void; @@ -212,7 +214,7 @@ export class CollectionSchemaCell extends React.Component<CellProps> { const aliasdoc = await SearchUtil.GetAliasesOfDocument(this._rowDataDoc); const targetContext = aliasdoc.length <= 0 ? undefined : Cast(aliasdoc[0].context, Doc, null); // Jump to the this document - DocumentManager.Instance.jumpToDocument(this._rowDoc, false, emptyFunction, targetContext ? [targetContext] : [], undefined, undefined, undefined, () => this.props.setPreviewDoc(this._rowDoc)); + DocumentManager.Instance.jumpToDocument(this._rowDoc, { willPan: true }, emptyFunction, targetContext ? [targetContext] : [], () => this.props.setPreviewDoc(this._rowDoc)); } }; @@ -507,7 +509,7 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { })} /> </div> - <div onClick={() => this._doc && this.props.addDocTab(this._doc, 'add:right')} className="collectionSchemaView-cellContents-docButton"> + <div onClick={() => this._doc && this.props.addDocTab(this._doc, OpenWhere.addRight)} className="collectionSchemaView-cellContents-docButton"> <FontAwesomeIcon icon="external-link-alt" size="lg" /> </div> </div> |
