Skip to content

Commit

Permalink
[Front] Better tables search in assistant builder
Browse files Browse the repository at this point in the history
  • Loading branch information
philipperolet committed Mar 7, 2024
1 parent 50680ba commit bb57c28
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { orderDatasourceByImportance } from "@app/lib/assistant";
import { CONNECTOR_CONFIGURATIONS } from "@app/lib/connector_providers";
import { getDisplayNameForDataSource } from "@app/lib/data_sources";
import { useTables } from "@app/lib/swr";
import { subFilter } from "@app/lib/utils";
import { compareForFuzzySort, subFilter } from "@app/lib/utils";

const STRUCTURED_DATA_SOURCES: ConnectorProvider[] = ["google_drive", "notion"];

Expand Down Expand Up @@ -225,7 +225,7 @@ const PickTable = ({
placeholder="Search..."
/>
{filtered
.sort((a, b) => (b.name ? 1 : 0) - (a.name ? 1 : 0))
.sort((a, b) => compareForFuzzySort(query, a.name, b.name))
.map((table) => {
return (
<Item.Navigation
Expand Down

0 comments on commit bb57c28

Please sign in to comment.