<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSOutlineViewDelegate/outlineView(_:nextTypeSelectMatchFromItem:toItem:for:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(pl)NSOutlineViewDelegate(im)outlineView:nextTypeSelectMatchFromItem:toItem:forString:"
  },
  "title" : "outlineView(_:nextTypeSelectMatchFromItem:toItem:for:)"
}
-->

# outlineView(_:nextTypeSelectMatchFromItem:toItem:for:)

Returns the first item that matches the searchString from within the range of startItem to endItem

```
@MainActor optional func outlineView(_ outlineView: NSOutlineView, nextTypeSelectMatchFromItem startItem: Any, toItem endItem: Any, for searchString: String) -> Any?
```

## Parameters

`outlineView`

The outline view that sent the message.

`startItem`

The first item to search.

`endItem`

The item before which to stop searching. It is possible for endItem to be less than startItem if the search will wrap.

`searchString`

The string for which to search.

## Return Value

The first item—from within the range of `startItem` to `endItem`—that matches the `searchString`, or `nil` if there is no match.

## Discussion

Implement this method if you want to control how type selection works.  You should include `startItem` as a possible match, but do not include `endItem`.

It is not necessary to implement this method in order to support type select.

---

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)