diff options
author | bobzel <zzzman@gmail.com> | 2020-08-26 02:30:44 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-26 02:30:44 -0400 |
commit | 6471ccff7dd145d3725492ccccaecc6035e851f2 (patch) | |
tree | 0826a9179b16e4d3fbe5925eadc8c738a00c575d /src | |
parent | d2e29bc56a8c0bc8bee0d1ceb28726b3caabdb36 (diff) |
fixed warnings. fixed url / annoation updating when navigating web pages.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/CollectionMenu.tsx | 6 | ||||
-rw-r--r-- | src/client/views/collections/CollectionSchemaCells.tsx | 6 | ||||
-rw-r--r-- | src/client/views/collections/CollectionTreeView.tsx | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index 2f257d00b..5f40ac59c 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -725,6 +725,8 @@ export class CollectionFreeFormViewChrome extends React.Component<CollectionMenu if (this.selectedDoc) { Doc.GetProto(this.selectedDoc).data = new WebField(value); Doc.SetInPlace(this.selectedDoc, "title", value, true); + const annots = Doc.GetProto(this.selectedDoc)["data-annotations-" + this.urlHash(value)]; + Doc.GetProto(this.selectedDoc)["data-annotations"] = annots instanceof ObjectField ? ObjectField.MakeCopy(annots) : new List<Doc>([]); } } @@ -751,9 +753,7 @@ export class CollectionFreeFormViewChrome extends React.Component<CollectionMenu } future && (future.length = 0); } - Doc.GetProto(selectedDoc).data = new WebField(URLy); - const annots = Doc.GetProto(selectedDoc)["data-annotations-" + this.urlHash(url)]; - Doc.GetProto(selectedDoc)["data-annotations"] = annots instanceof ObjectField ? ObjectField.MakeCopy(annots) : new List<Doc>([]); + this._url = url; } } } catch (e) { diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 95f425524..18ca29aaa 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -169,7 +169,7 @@ export class CollectionSchemaCell extends React.Component<CellProps> { const targetContext = aliasdoc.length <= 0 ? undefined : Cast(aliasdoc[0].context, Doc, null); DocumentManager.Instance.jumpToDocument(this._rowDoc, false, () => undefined, targetContext); } - }; + } renderCellWithType(type: string | undefined) { const dragRef: React.RefObject<HTMLDivElement> = React.createRef(); @@ -330,7 +330,7 @@ export class CollectionSchemaDocCell extends CollectionSchemaCell { componentWillUnmount() { this.onBlur(); } - onBlur = () => { this._overlayDisposer?.(); } + onBlur = () => { this._overlayDisposer?.(); }; onFocus = () => { this.onBlur(); this._overlayDisposer = OverlayView.Instance.addElement(<DocumentIconContainer />, { x: 0, y: 0 }); @@ -443,7 +443,7 @@ export class CollectionSchemaListCell extends CollectionSchemaCell { } render() { - let link = false; + const link = false; const reference = React.createRef<HTMLDivElement>(); if (this._optionsList?.length) { diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx index 918377052..5099f0022 100644 --- a/src/client/views/collections/CollectionTreeView.tsx +++ b/src/client/views/collections/CollectionTreeView.tsx @@ -825,7 +825,7 @@ export class CollectionTreeView extends CollectionSubView<Document, Partial<coll whenActiveChanged = (isActive: boolean) => { this.props.whenActiveChanged(this._isChildActive = isActive); } - active = (outsideReaction: boolean | undefined) => { return this.props.active(outsideReaction) || this._isChildActive; } + active = (outsideReaction: boolean | undefined) => this.props.active(outsideReaction) || this._isChildActive; render() { TraceMobx(); if (!(this.doc instanceof Doc)) return (null); |