aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-03-16 15:06:12 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-03-16 15:06:12 -0400
commit338220488260e11949434b2fd4d03eaaa1f7e53c (patch)
tree162ba05f70619b86ef9f839a0a0b75d3582d94a5 /src
parent5eba573d06b34184fc11cebcd73dc56decaa766b (diff)
summoning
Diffstat (limited to 'src')
-rw-r--r--src/client/util/SelectionManager.ts6
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/client/util/SelectionManager.ts b/src/client/util/SelectionManager.ts
index 36b926053..1ab982af1 100644
--- a/src/client/util/SelectionManager.ts
+++ b/src/client/util/SelectionManager.ts
@@ -34,7 +34,10 @@ export class SelectionManager {
public static SelectView = action((docView: DocumentView | undefined, extendSelection: boolean): void => {
if (!docView) this.DeselectAll();
else if (!docView.IsSelected) {
- if (!extendSelection) this.DeselectAll();
+ if (!extendSelection) {
+ this.DeselectAll();
+ console.log("1");
+ };
this.Instance.SelectedViews.push(docView);
docView.IsSelected = true;
docView._props.whenChildContentsActiveChanged(true);
@@ -51,6 +54,7 @@ export class SelectionManager {
});
public static DeselectAll = (except?: Doc): void => {
+ console.log("deselected");
const found = this.Instance.SelectedViews.find(dv => dv.Document === except);
runInAction(() => {
LinkManager.Instance.currentLink = undefined;
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index 161468041..71d54eae2 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -187,14 +187,14 @@ export class CollectionSchemaView extends CollectionSubView() {
const lastIndex = this.rowIndex(lastDoc);
const curDoc = this.sortedDocs.docs[lastIndex];
if (lastIndex >= 0 && lastIndex < this.childDocs.length - 1) {
- !e.shiftKey && this.clearSelection();
+ //!e.shiftKey && this.clearSelection();
const newDoc = this.sortedDocs.docs[lastIndex + 1];
const newDoc2 = this.sortedDocs.docs[lastIndex + 2];
if (this._selectedDocs.includes(newDoc)) {
SelectionManager.DeselectView(DocumentManager.Instance.getFirstDocumentView(curDoc));
} else {
this.addDocToSelection(newDoc, true, lastIndex + 1);
- this.addDocToSelection(newDoc2, e.shiftKey, lastIndex + 2);
+ this.addDocToSelection(newDoc2, true, lastIndex + 2);
//this._selectedCell && (this._selectedCell[0] = newDoc);
this.scrollToDoc(newDoc, {});
}