aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/TabDocView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-11-07 13:48:26 -0500
committerbobzel <zzzman@gmail.com>2023-11-07 13:48:26 -0500
commita6cc25e5d03ffed16bfaa32e48e9cc2eaff7deaf (patch)
tree1322ef9a743457f23851ba7c9d5d3dd090f1f75d /src/client/views/collections/TabDocView.tsx
parenta4e3b645317c4589cf49f8007f6e6b57cf2c12d3 (diff)
Changed how selection works to avoid invalidations. Fixed Cast problem with ProxyFields that caused renameEmbedding to infinite loop.. Changed brushing for the same reason. Cleaned up a few things with filter code.
Diffstat (limited to 'src/client/views/collections/TabDocView.tsx')
-rw-r--r--src/client/views/collections/TabDocView.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx
index 26aa5a121..41f3b2603 100644
--- a/src/client/views/collections/TabDocView.tsx
+++ b/src/client/views/collections/TabDocView.tsx
@@ -53,7 +53,7 @@ export class TabDocView extends React.Component<TabDocViewProps> {
@observable _isActive: boolean = false;
@observable _isAnyChildContentActive = false;
@computed get _isUserActivated() {
- return SelectionManager.Views().some(view => view.rootDoc === this._document) || this._isAnyChildContentActive;
+ return SelectionManager.IsSelected(this._document) || this._isAnyChildContentActive;
}
@computed get _isContentActive() {
return this._isUserActivated || this._hovering;
@@ -203,7 +203,7 @@ export class TabDocView extends React.Component<TabDocViewProps> {
}
});
tab._disposers.selectionDisposer = reaction(
- () => SelectionManager.Views().some(view => view.rootDoc === this._document),
+ () => SelectionManager.IsSelected(this._document),
action(selected => {
if (selected) this._activated = true;
const toggle = tab.element[0].children[2].children[0] as HTMLInputElement;