From c3eca49311f3ee5fa0721cace8ed0798ce30eb89 Mon Sep 17 00:00:00 2001 From: maks Date: Sun, 8 Sep 2024 12:58:35 +0100 Subject: [PATCH] feat: provided drag model information in the event --- docs | 2 +- formats/date | 2 +- src/components/order/revogr-order-editor.tsx | 4 +++- src/components/revoGrid/revo-grid.tsx | 6 +----- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/docs b/docs index a5b8833a..375deaf1 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit a5b8833a210b0f79c8df358ba34df687559df7d9 +Subproject commit 375deaf1d9428e33a73f7adfbddcc0c09fb404b3 diff --git a/formats/date b/formats/date index b1733c54..f55653a0 160000 --- a/formats/date +++ b/formats/date @@ -1 +1 @@ -Subproject commit b1733c54aede78e125590c8119be45b53fa1bf9d +Subproject commit f55653a0d34baf2ebd5529332a09d32808cba781 diff --git a/src/components/order/revogr-order-editor.tsx b/src/components/order/revogr-order-editor.tsx index c80554f2..c608ea51 100644 --- a/src/components/order/revogr-order-editor.tsx +++ b/src/components/order/revogr-order-editor.tsx @@ -1,7 +1,7 @@ import { Component, Method, Event, EventEmitter, Prop } from '@stencil/core'; import debounce from 'lodash/debounce'; -import { DSourceState } from '@store'; +import { DSourceState, getSourceItem } from '@store'; import { DRAGG_TEXT } from '../../utils/consts'; import RowOrderService from './order-row.service'; import { @@ -42,6 +42,7 @@ export class OrderEditor { pos: PositionItem; event: MouseEvent; rowType: DimensionRows; + model: any; }>; /** Row drag ended started */ @@ -109,6 +110,7 @@ export class OrderEditor { pos, event: e.originalEvent, rowType: this.rowType, + model: getSourceItem(this.dataStore, pos.itemIndex), }); if (dragStartEvent.defaultPrevented) { return; diff --git a/src/components/revoGrid/revo-grid.tsx b/src/components/revoGrid/revo-grid.tsx index af7fca6e..12929498 100644 --- a/src/components/revoGrid/revo-grid.tsx +++ b/src/components/revoGrid/revo-grid.tsx @@ -893,11 +893,7 @@ export class RevoGridComponent { // #region Listeners /** Drag events */ @Listen('rowdragstartinit') onRowDragStarted( - e: CustomEvent<{ - pos: PositionItem; - text: string; - event: MouseEvent; - }>, + e: CustomEvent, ) { const dragStart = this.rowdragstart.emit(e.detail); if (dragStart.defaultPrevented) {