As on Outlook, we can select a message and drag-and-drop it onto another folder. We will also implement this functionality in our e-mail client module. But there is one important detail: first, we need to do a drag-and-drop between a Grid panel (list of e-mails) and a Tree panel (mail menu). And second, we do not want to move a record from the Grid panel to the Tree panel. We simply want to be able to drop an e-mail message into a node of the Tree Panel and not actually add it to the Tree panel as a new node (meaning it will be added to the tree store). So let's keep this in mind when we implement this functionality. This example is very good because it demonstrates that we can customize some actions of the drag-and-drop capability.
So first, we need to add the drag-and-drop capability to the Grid panel and the Tree panel.
In the Packt.view.mail.MailList
class, inside the viewConfig
method, we need to add the following code (before or after the getRowClass...