---
title: "DeleteItemsCommand | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/DeleteItemsCommand/"
---

# DeleteItemsCommand

> - [`BaseItemsCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseItemsCommand.md#abstract-baseitemscommand)\<[`IDeleteItemsCommandArgs`](#ideleteitemscommandargs), `void`\>

## Classes

### DeleteItemsCommand

#### Extends

#### Constructors

##### Constructor

```ts
new DeleteItemsCommand(
   productHandler, 
   historyArgs, 
   args, 
   canvas, 
   viewerConf, 
   commandManager): DeleteItemsCommand;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `productHandler` | [`ProductHandler`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ProductHandler.md#producthandler) |
| `historyArgs` | [`IHistoryArgs`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/ModelUpdateCommand.md#ihistoryargs) |
| `args` | [`IDeleteItemsCommandArgs`](#ideleteitemscommandargs) |
| `canvas` | [`Canvas`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Canvas-1.md#canvas) |
| `viewerConf` | [`IViewerConfiguration`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/IViewerConfiguration.md#iviewerconfiguration) |
| `commandManager` | [`CommandManager`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/CommandManager.md#commandmanager) |

###### Returns

[`DeleteItemsCommand`](#deleteitemscommand)

###### Overrides

[`BaseItemsCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseItemsCommand.md#abstract-baseitemscommand).[`constructor`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseItemsCommand.md#constructor)

#### Methods

##### deleteItem()

```ts
deleteItem(item): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `item` | `Item` |

###### Returns

`void`

##### deleteItems()

```ts
deleteItems(
   items, 
   force, 
   autoUngroup, 
   autoParentGroupDelete): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `items` | `Item`[] |
| `force` | `boolean` |
| `autoUngroup` | `boolean` |
| `autoParentGroupDelete` | `boolean` |

###### Returns

`void`

##### execute()

```ts
execute(): Promise<void>;
```

###### Returns

[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`void`\>

###### Inherited from

[`BaseItemsCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseItemsCommand.md#abstract-baseitemscommand).[`execute`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseItemsCommand.md#execute)

##### executeCommandBody()

```ts
executeCommandBody(): Promise<void>;
```

###### Returns

[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`void`\>

###### Overrides

```ts
BaseItemsCommand._executeCommandBody
```

##### redo()

```ts
redo(): Promise<void>;
```

###### Returns

[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`void`\>

###### Overrides

[`BaseItemsCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseItemsCommand.md#abstract-baseitemscommand).[`redo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseItemsCommand.md#redo)

##### undo()

```ts
undo(): Promise<void>;
```

###### Returns

[`Promise`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/finally.md#promise)\<`void`\>

###### Overrides

[`BaseItemsCommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseItemsCommand.md#abstract-baseitemscommand).[`undo`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/BaseItemsCommand.md#undo)

## Interfaces

### IDeleteItemsCommandArgs

#### Extends

- [`MultiSelectMode`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Commands.md#multiselectmode)\<[`MultiSelectMode`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms/Commands.md#multiselectmode)\>
