# table.onFieldDelete
Listening field added event, will return a cancel listening function.

## Permission Requirements
**Notice**：Enable any of the following permissions
View, comment, edit and manage multidimensional tables(bitable:app)
View, comment and export multidimensional tables(bitable:app:readonly)

## input
```
onFieldDelete((event) => {})
```

name | Data Type | Required | Description
---|---|---|---
event | ```js<br>{<br>"name": string,<br>"type": "publish",<br>"data": {<br>"tableId": string,<br>"fieldId": string,<br>"fieldType": number<br>},<br>} | No | Information about deleted fields

## output
Function to unlisten.
## sample code

```js
const selection = await bitable. base. getSelection();
const table = await bitable.base.getTableById(selection.tableId);

const off = table.onFieldDelete((event) => {
   off();
   console.log('event:', event);
})

const fieldId = await table.addField({ // Add a new field.
   type: FieldType. Text,
   name: 'Add-2'
})

table.deleteField(fieldId)//Delete the field.
```