aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-05-09 23:02:18 -0400
committerbobzel <zzzman@gmail.com>2025-05-09 23:02:18 -0400
commitafc2b90c3eab26a8a3d17bdb711652b68d2528d9 (patch)
tree58f9edb8a79c9e1e983c9cc4e8c07988e7dd5f1d /src/client/views/collections/CollectionStackingViewFieldColumn.tsx
parent076bdacc5f05dd124823981e49174d276a7aebfd (diff)
parent299398cb7e21259de3bf7597995840b84e7e0590 (diff)
Merge branch 'master' into lanyi-branch
Diffstat (limited to 'src/client/views/collections/CollectionStackingViewFieldColumn.tsx')
-rw-r--r--src/client/views/collections/CollectionStackingViewFieldColumn.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
index 994669734..345f60e75 100644
--- a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
+++ b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
@@ -71,6 +71,7 @@ export class CollectionStackingViewFieldColumn extends ObservableReactComponent<
}
_ele: HTMLElement | null = null;
+ _eleMasonrySingle = React.createRef<HTMLDivElement>();
protected onInternalPreDrop = (e: Event, de: DragManager.DropEvent, targetDropAction: dropActionType) => {
const dragData = de.complete.docDragData;
@@ -92,13 +93,13 @@ export class CollectionStackingViewFieldColumn extends ObservableReactComponent<
createColumnDropRef = (ele: HTMLDivElement | null) => {
this.dropDisposer?.();
if (ele) this.dropDisposer = DragManager.MakeDropTarget(ele, this.columnDrop.bind(this), this._props.Doc, this.onInternalPreDrop.bind(this));
- else if (this._ele) this.props.refList.splice(this.props.refList.indexOf(this._ele), 1);
+ else if (this._eleMasonrySingle.current) this.props.refList.splice(this.props.refList.indexOf(this._eleMasonrySingle.current), 1);
this._ele = ele;
};
@action
componentDidMount() {
- this._ele && this.props.refList.push(this._ele);
+ this._eleMasonrySingle.current && this.props.refList.push(this._eleMasonrySingle.current);
this._disposers.collapser = reaction(
() => this._props.headingObject?.collapsed,
collapsed => { this.collapsed = collapsed !== undefined ? BoolCast(collapsed) : false; }, // prettier-ignore
@@ -363,6 +364,7 @@ export class CollectionStackingViewFieldColumn extends ObservableReactComponent<
}}>
<div
key={`${heading}-stack`}
+ ref={this._eleMasonrySingle}
className="collectionStackingView-masonrySingle"
style={{
padding: `${columnYMargin}px ${0}px ${this._props.yMargin}px ${0}px`,