@@ -54,7 +54,7 @@
@click="emitFlyingContext(model)"
>
-
+
@@ -167,7 +167,8 @@ import { LoadingEvent } from '@a-vue/events'
'rowClasses',
'rowListeners',
{
- bulkselection: false,
+ bulkSelection: false,
+ dragMode: 'grab',
getSubModels: {
default: () => model => []
}
@@ -186,6 +187,25 @@ export default class ListView extends Mixins(ListViewMixin) {
selectedModels = []
+ dragMode_ = null
+ bulkSelection_ = null
+
+ setDragMode (mode) {
+ this.dragMode_ = mode
+ }
+
+ get _dragMode () {
+ return this.dragMode_ || this.dragMode
+ }
+
+ setBulkSelection (mode) {
+ this.bulkSelection_ = mode
+ }
+
+ get _bulkSelection () {
+ return this.bulkSelection_ || this.bulkSelection
+ }
+
isSelected (model) {
return this.selectedModels.includes(model)
}
@@ -269,6 +289,10 @@ export default class ListView extends Mixins(ListViewMixin) {
}
startShifting (event) {
+ if (this._dragMode !== 'grab') {
+ return
+ }
+
this.scrollContainerX = this.getScrollParent(this.$el.querySelector('.a-table-wrapper'), 'h')
this.scrollContainerY = this.getScrollParent(this.$el.querySelector('.a-table-wrapper'), 'v')
@@ -352,7 +376,10 @@ export default class ListView extends Mixins(ListViewMixin) {
overflow-x: auto;
overflow-y: hidden;
padding-bottom: 1rem;
- cursor: grab;
+
+ &.grab {
+ cursor: grab;
+ }
}
.filters:not(:empty) {