aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/collectionSchema/CollectionSchemaView.tsx')
-rw-r--r--src/client/views/collections/collectionSchema/CollectionSchemaView.tsx11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index d079bf839..28e0b07a4 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -238,25 +238,22 @@ export class CollectionSchemaView extends CollectionSubView() {
};
@action
- startResize = (e: any, index: number, left: boolean) => {
+ startResize = (e: any, index: number) => {
this._displayColumnWidths = this.storedColumnWidths;
- setupMoveUpEvents(this, e, (e, delta) => this.resizeColumn(e, index, left), this.finishResize, emptyFunction);
+ setupMoveUpEvents(this, e, (e, delta) => this.resizeColumn(e, index), this.finishResize, emptyFunction);
};
@action
- resizeColumn = (e: PointerEvent, index: number, left: boolean) => {
+ resizeColumn = (e: PointerEvent, index: number) => {
if (this._displayColumnWidths) {
let shrinking;
let growing;
let change = e.movementX;
- if (left && index !== 0) {
+ if (index !== 0) {
growing = change < 0 ? index : index - 1;
shrinking = change < 0 ? index - 1 : index;
- } else if (!left && index !== this.columnKeys.length - 1) {
- growing = change > 0 ? index : index + 1;
- shrinking = change > 0 ? index + 1 : index;
}
if (shrinking === undefined || growing === undefined) return true;