From 9806f24e9edb1c84d4a7f6aed4903cf6fcc153b8 Mon Sep 17 00:00:00 2001 From: Tom Robinson <tlrobinson@gmail.com> Date: Thu, 7 Jun 2018 15:57:24 -0700 Subject: [PATCH] Update search collection parameter --- frontend/src/metabase/components/CollectionLanding.jsx | 5 +---- frontend/src/metabase/containers/CollectionItemsLoader.jsx | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/src/metabase/components/CollectionLanding.jsx b/frontend/src/metabase/components/CollectionLanding.jsx index 45df29d0b93..fda2907c271 100644 --- a/frontend/src/metabase/components/CollectionLanding.jsx +++ b/frontend/src/metabase/components/CollectionLanding.jsx @@ -80,10 +80,7 @@ const CollectionList = () => { }; @connect((state, { collectionId }) => ({ - entityQuery: - collectionId === "root" - ? {} // FIXME /api/search doesn't yet support root collection - : { collection_id: collectionId }, + entityQuery: { collection: collectionId }, })) @entityListLoader({ entityType: "search", diff --git a/frontend/src/metabase/containers/CollectionItemsLoader.jsx b/frontend/src/metabase/containers/CollectionItemsLoader.jsx index e22ae4976ab..97dd935e44a 100644 --- a/frontend/src/metabase/containers/CollectionItemsLoader.jsx +++ b/frontend/src/metabase/containers/CollectionItemsLoader.jsx @@ -17,7 +17,7 @@ const CollectionItemsLoader = ({ collectionId, children, ...props }: Props) => ( <EntityListLoader {...props} entityType="search" - entityQuery={{ collectionId }} + entityQuery={{ collection: collectionId }} wrapped children={({ list }) => object && -- GitLab