Member Junction
    Preparing search index...
    • Rank lookup rows so that names starting with what the user typed come before names that merely contain it somewhere, alphabetically within each tier.

      Three typed letters otherwise match any name containing them anywhere, so an organization whose name merely happens to include the sequence outranks the one the user was reaching for. An empty query is a single tier, alphabetical.

      Type Parameters

      • T extends { Values: Record<string, unknown> }

      Parameters

      • rows: readonly T[]
      • query: string
      • nameField: string

      Returns T[]

      A NEW array (never mutates the input).