Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Wrong Documentation for Transfer

Vasileios Valasidis free 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 .... :-|



  _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');
  }


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 free 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.


Michał Duszak staff answered 3 years ago


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



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