---
title: "textField(_:didSelect:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstextsuggestionsdelegate/textfield(_:didselect:)"
---

# textField(_:didSelect:)

Called when an item in the suggestions menu has been selected.

## Declaration

```swift
@MainActor func textField(_ textField: NSTextField, didSelect item: Self.Item)
```

## Parameters

- `textField`: The text field whose suggestions item was highlighted.
- `item`: The item that was selected.

## Discussion

Discussion The default implementation inserts the item’s text completion (textField(_:textCompletionFor:)) into the control, replacing its existing text. Overriding this method allows you to do a custom behavior instead.
