# Upgrade guide for Gantt v4.0.1

## AssignmentField picker now *is* a Grid, previously it *contained* a Grid

The picker of the AssignmentField was promoted to be an AssignmentGrid. This means you no longer have to configure the
grid using the `grid` config, instead you simply configure the field 
[picker](#Gantt/widget/AssignmentField#config-picker) directly.

**Old code:**

```javascript
const gantt = new Gantt({
    appendTo : 'container',
    columns  : [
        { type : 'name', field : 'name', text : 'Name', width : 250 },
        {
            type        : 'resourceassignment',
            width       : 250,
            showAvatars : true,
            editor      : {
                type   : 'assignmentfield',
                picker : {
                    grid : {
                        features : {
                            /*...*/
                        },
                        height   : 350,
                        width    : 450,
                        columns  : [
                            /*...*/
                        ]
                    }
                }
            }
        }
    ]
});
```

**New code:**

```javascript
const gantt = new Gantt({
    appendTo : 'container',
    columns  : [
        { type : 'name', field : 'name', text : 'Name', width : 250 },
        {
            type        : 'resourceassignment',
            width       : 250,
            showAvatars : true,
            editor      : {
                type   : 'assignmentfield',
                picker : {
                    // Grid configs go here
                    height   : 350,
                    width    : 450,
                    features : {
                        /*...*/
                    },
                    columns  : [
                        // Additional columns go here
                    ]
                }
            }
        }
    ]
});
```


<p class="last-modified">Last modified on 2023-10-26 8:19:02</p>