Skip to content
Snippets Groups Projects
Unverified Commit 18313cd7 authored by Kamil Mielnik's avatar Kamil Mielnik Committed by GitHub
Browse files

Remove snippets from search types (#42315)

* Remove snippets in search models
- They're not supported, see model-to-db-model in search/config.clj

* Fix TS error

* Fix TS error
parent bb8f00bd
Branches
Tags
No related merge requests found
......@@ -23,7 +23,6 @@ export const SEARCH_MODELS = [
...ENABLED_SEARCH_MODELS,
"segment",
"metric",
"snippet",
] as const;
export type EnabledSearchModel = typeof ENABLED_SEARCH_MODELS[number];
......
......@@ -17,7 +17,8 @@ import {
import { useSearchListQuery } from "./use-search-list-query";
const TEST_ITEM = createMockCollectionItem();
const TEST_ITEM_MODEL = "card";
const TEST_ITEM = createMockCollectionItem({ model: TEST_ITEM_MODEL });
const TEST_TABLE_DB_ID = 1;
const TEST_SEARCH_RESULTS = createMockSearchResults({
......@@ -35,7 +36,7 @@ const TestComponent = () => {
error,
} = useSearchListQuery({
query: {
models: [TEST_ITEM.model],
models: [TEST_ITEM_MODEL],
limit: TEST_SEARCH_METADATA.limit,
offset: TEST_SEARCH_METADATA.offset,
table_db_id: TEST_TABLE_DB_ID,
......
......@@ -27,7 +27,6 @@ const modelIconMap: Record<SearchModel, IconName> = {
card: "table",
segment: "segment",
metric: "funnel",
snippet: "snippet",
};
const secondaryModelIconMap: Partial<Record<SearchModel, IconName>> = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment