---
title: resignsFirstResponderWithCancel
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nssearchtoolbaritem/resignsfirstresponderwithcancel
---

# resignsFirstResponderWithCancel

A Boolean value that enables the cancel button in the search field to resign the first responder in addition to clearing the contents.

## Declaration

```swift
var resignsFirstResponderWithCancel: Bool { get set }
```

## Discussion

Discussion The default value is true. If set to false, the cancel button only clears the contents of the search field.

## See Also

### Configuring a search item

- [preferredWidthForSearchField](appkit/nssearchtoolbaritem/preferredwidthforsearchfield.md)
- [searchField](appkit/nssearchtoolbaritem/searchfield.md)
