<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTableViewDelegate/tableView(_:shouldTypeSelectFor:withCurrentSearch:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSTableViewDelegate(im)tableView:shouldTypeSelectForEvent:withCurrentSearchString:"
  },
  "title" : "tableView(_:shouldTypeSelectFor:withCurrentSearch:)"
}
-->

# tableView(_:shouldTypeSelectFor:withCurrentSearch:)

Asks the delegate to allow or deny type select for the specified event and current search string.

```
@MainActor optional func tableView(_ tableView: NSTableView, shouldTypeSelectFor event: NSEvent, withCurrentSearch searchString: String?) -> Bool
```

## Parameters

`tableView`

The table view that sent the message.

`event`

The event.

`searchString`

The search string or `nil` if no type select has began.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> to allow type select for event, <doc://com.apple.documentation/documentation/Swift/false> otherwise.

## Discussion

Typically, this is called from the [`NSTableView`](/documentation/AppKit/NSTableView) `keyDown:` implementation and the event will be a key event.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)