AngularJS - Conditional filter in ng-repeat

This is my code:

<div ng-repeat="cat in categs | filter:searchText">
      <div><h1 id="{{cat.id}}">{{cat.title}}</h1></div>
       <table>
        <tbody>
            <tr ng-repeat-start="subcat in cat.data | filter:searchText">
                <th><h2 id="{{cat.id}}_{{subcat.id}}">{{subcat.title}}</h2></th>
            </tr>
            <tr ng-repeat-start="subsubcat in subcat.data | filter:searchText">
                <td><h3 id="{{cat.id}}_{{subcat.id}}_{{subsubcat.id}}">{{subsubcat.title}}</h3></td>
            </tr>
            <tr>
                <th>Nombre</th>
                <th>Descripcion</th>
                <th>Enlace</th>   
            </tr>
            <tr ng-repeat-end ng-repeat="item in subsubcat.data | filter:searchText">
                <td>{{item.name}}</td>
                <td>{{item.about}}</td>
                <td><a href="{{item.url}}" target="_blank">{{item.urltext}}</a></td>
            </tr>
            <tr ng-repeat-end>
                <td></td>
            </tr>
        </tbody>
    </table>
  </div>

and the current filtering isn't working for what I want to do, that is:

If the title of h1,h2 or h3 matches searchText, then show everything nested inside (don't filter anything inside).

But if neither h1,h2 or h3 matches searchText but what's in the last ng-repeat-start matches something, filter only what matched.

To explain myself better, here is an example:

  • Vehicles
    • Cars
      • BMW
        • item1: green
        • item2: red
        • item3: black
      • Toyota
    • Bikes

If searchText is:

  • vehicles : it shows everything.
  • cars : it shows vehicles header and cars header(and everything under) but doesn't show bikes (unless the the text "cars" appears in some subheader inside bikes or in some item)
  • black : only shows Vehicles, Cars and BMW headers and only item3.

The problem of the current code is that, if I remove the filter from the last ng-repeat-start it does what I want to do in the cars example but doesn't work for the black example.