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, 7 insertions, 4 deletions
diff --git a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
index a6a5df4b9..ef3efea39 100644
--- a/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
+++ b/src/client/views/collections/collectionSchema/CollectionSchemaView.tsx
@@ -377,20 +377,23 @@ export class CollectionSchemaView extends CollectionSubView() {
};
@action
- startResize = (e: any, index: number) => {
+ startResize = (e: any, index: number, rightSide: boolean) => {
this._displayColumnWidths = this.storedColumnWidths;
- setupMoveUpEvents(this, e, moveEv => this.resizeColumn(moveEv, index), this.finishResize, emptyFunction);
+ setupMoveUpEvents(this, e, moveEv => this.resizeColumn(moveEv, index, rightSide), this.finishResize, emptyFunction);
};
@action
- resizeColumn = (e: PointerEvent, index: number) => {
+ resizeColumn = (e: PointerEvent, index: number, rightSide: boolean) => {
if (this._displayColumnWidths) {
let shrinking;
let growing;
let change = e.movementX;
- if (index !== 0) {
+ if (rightSide && (index !== this._displayColumnWidths.length - 1)) {
+ growing = change < 0 ? index + 1: index;
+ shrinking = change < 0 ? index : index + 1;
+ } else if (index !== 0) {
growing = change < 0 ? index : index - 1;
shrinking = change < 0 ? index - 1 : index;
}