Wrong Documentation for Transfer


Topic: Wrong Documentation for Transfer

Vasileios Valasidis asked 3 years ago

const EVENT_ON_CHANGE = onChange${EVENT_KEY}; const EVENT_ON_SEARCH = onSearch${EVENT_KEY}; const EVENT_ON_SELECT = onSelect${EVENT_KEY};

Documentation

change.mdb.transfer => This event fires immediately .... search.mdb.transfer => This event fires immediately .... select.mdb.transfer => This event fires immediately ....

Please Check the quality of Documentation .... :-|


Michał Duszak staff answered 3 years ago

Hello, thank you for your feedback. We will fix this asap.


Thank you for the documentation, there is a big unsolved issue .

I cannot retrieve datasource and datatarget after the onChange.

the onChange handlers triggers before change, so we need a handler after change of lists.

Am I right or wrong ?


Michał Duszak staff commented 3 years ago

Those are the private members. User is supposed to be retrieving itemsToSend upon firing the onChange event.


Vasileios Valasidis commented 3 years ago

Sure , I agree with you ... But if you see my below comment the firing of onChange Event happens before changes ...


Michał Duszak staff commented 3 years ago

Thank you for your feedback. We will discuss changing it with the team.


  _handleSendToSource() {
    const itemsToSend = [];
    this._dataTarget.forEach((item) => {
      if (item.checked) {
        itemsToSend.push(item);
      }
    });
    !!!!!EventHandler.trigger(this._element, EVENT_ON_CHANGE, { sentItems: itemsToSend });
    !!!!!console.log('trigger change1');

    this._dataTarget = this._dataTarget.filter((item) => {
      const isNotCheck = !item.checked;
      item.checked = false;
      return isNotCheck;
    });
    this._dataSource = [...this._dataSource, ...itemsToSend];

    >>>>>EventHandler.trigger(this._element, EVENT_ON_CHANGE, { sentItems: itemsToSend });
    >>>>>console.log('trigger change1');
  }

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
  • User: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: MDB5 3.9.0
  • Device: web
  • Browser: all
  • OS: windows
  • Provided sample code: No
  • Provided link: No