---
title: "tableView(_:shouldTypeSelectFor:withCurrentSearch:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nstableviewdelegate/tableview(_:shouldtypeselectfor:withcurrentsearch:)"
---

# tableView(_:shouldTypeSelectFor:withCurrentSearch:)

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

## Declaration

```swift
@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

Return Value true to allow type select for event, false otherwise.

## Discussion

Discussion Typically, this is called from the NSTableView keyDown: implementation and the event will be a key event.

## See Also

### Selecting rows

- [selectionShouldChange(in:)](appkit/nstableviewdelegate/selectionshouldchange(in:).md)
- [tableView(_:shouldSelectRow:)](appkit/nstableviewdelegate/tableview(_:shouldselectrow:).md)
- [tableView(_:selectionIndexesForProposedSelection:)](appkit/nstableviewdelegate/tableview(_:selectionindexesforproposedselection:).md)
- [tableView(_:shouldSelect:)](appkit/nstableviewdelegate/tableview(_:shouldselect:).md)
- [tableViewSelectionIsChanging(_:)](appkit/nstableviewdelegate/tableviewselectionischanging(_:).md)
- [tableViewSelectionDidChange(_:)](appkit/nstableviewdelegate/tableviewselectiondidchange(_:).md)
- [tableView(_:typeSelectStringFor:row:)](appkit/nstableviewdelegate/tableview(_:typeselectstringfor:row:).md)
- [tableView(_:nextTypeSelectMatchFromRow:toRow:for:)](appkit/nstableviewdelegate/tableview(_:nexttypeselectmatchfromrow:torow:for:).md)
