Topic: Transfer Module Onchange which is source and target

jamie priority asked 2 years ago

I am trying to use the Transfer Module, I populate the transfer module with data from my database and this all works and I can move the data between the source and target.

I want to catch those changes so i can update the database with the changes.

So I can use the e.sentItems to catch the data being sent, how do I determine which direction it has been sent? Also with the dataSource/dataTarget options can we specify our own ID or add additional fields so when the e.sentItems is used we can catch more of the data?

transferEl.addEventListener('onChange.mdb.transfer', (e) => { console.log(e.sentItems) })

Grzegorz Bujański staff answered 2 years ago

You can listen to the button click and save under the variable transfer direction.

Here is an example of how to do it:

Unfortunately, it is currently not possible to set a custom id for elements. I'll add this to our to-do list to add this option.

Please insert min. 20 characters.


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



Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 4.1.0
  • Device: desktop
  • Browser: chrome
  • OS: win10
  • Provided sample code: No
  • Provided link: No