meesha81 priority asked 3 months ago


Is possible to use drag and drop plugin to table resizer ? Not data table.

I can move by div "resizer", but I need e.pageX in the event, but event do not provide mouse position. Is some way how to calculate/change column widht?

If I can get pageX position of mouse, I can do it myself. So, how can I get pageX in the start/stop/itemMove draggable event? Or is some way how to do it "native"?


Grzegorz Bujański staff answered 3 months ago


Try to add event mouseup to start.mdb.draggable event, which will return the necessary information:

const el = document.querySelector('.draggable-element')
el.addEventListener('start.mdb.draggable', () => {
  window.addEventListener('mouseup', (e) => {
    console.log(e.pageX)
  }, {once: true})
})


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 7.3.2
  • Device: PC
  • Browser: Chrome
  • OS: Win11
  • Provided sample code: No
  • Provided link: No