# Upgrade guide for Gantt v5.4.0

## Changes to Task bars CSS classes
The Gantt's Tasks now has the same `eventColor` field as the Scheduler's Events has. Because of this, a few changes to
the Task bar's CSS classes has been made.

These SASS variables is no longer used:
* `$gantt-task-hover-background-color`
* `$gantt-task-parent-hover-background`

## TaskCopyPaste has been made asynchronous
The TaskCopyPaste feature's `copyRows` and `pasteRows` has been made asynchronous. This makes the `beforeCopy` and
`beforePaste` events asynchronously preventable and allows for native Clipboard API support.

If your code relies on a copy or paste action to complete, you will need to wait for the promise to be resolved.

**Old code:**

```javascript
function copyPaste()
{
    gantt.copyRows();
    doSomethingElse();
    gantt.pasteRows();
    finishDoingSomethingElse();
}
```

**New code:**

```javascript
async function copyPaste()
{
    await gantt.copyRows();
    doSomethingElse();
    await gantt.pasteRows();
    finishDoingSomethingElse();
}
```

...or...

```javascript
function copyPaste()
{
    return gantt.copyRows().then(() => {
        doSomethingElse();
        gantt.pasteRows().then(() => {
            finishDoingSomethingElse();
            return true;
        });
    });
}
```


<p class="last-modified">Last modified on 2023-10-26 8:19:02</p>