From 4138e7c4df3caba8c4def9340d1c2f70ae1bc4b7 Mon Sep 17 00:00:00 2001 From: yatsukbogdan Date: Thu, 26 Jan 2023 09:29:40 +0200 Subject: [PATCH 1/3] Fixes BulkEditServiceProvider to use filtered streams instead of all streams --- .../src/components/connection/CatalogTree/CatalogTree.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte-webapp/src/components/connection/CatalogTree/CatalogTree.tsx b/airbyte-webapp/src/components/connection/CatalogTree/CatalogTree.tsx index a15717762f2d..2403358931d1 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/CatalogTree.tsx +++ b/airbyte-webapp/src/components/connection/CatalogTree/CatalogTree.tsx @@ -70,7 +70,7 @@ const CatalogTreeComponent: React.FC> ); return ( - + {mode !== "readonly" && }
From ae0bc18a2723b38480e28a0e55f70c088b0ec423 Mon Sep 17 00:00:00 2001 From: yatsukbogdan Date: Tue, 31 Jan 2023 11:06:17 +0200 Subject: [PATCH 2/3] Fixes CatalogTree streams updating while filtering streams by search input --- .../src/components/connection/CatalogTree/CatalogTree.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/airbyte-webapp/src/components/connection/CatalogTree/CatalogTree.tsx b/airbyte-webapp/src/components/connection/CatalogTree/CatalogTree.tsx index 2403358931d1..198f3589fde9 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/CatalogTree.tsx +++ b/airbyte-webapp/src/components/connection/CatalogTree/CatalogTree.tsx @@ -30,6 +30,12 @@ const CatalogTreeComponent: React.FC> const [searchString, setSearchString] = useState(""); + const onBatchStreamsChanged = useCallback( + (newStreams: SyncSchemaStream[]) => + onStreamsChanged(streams.map((str) => newStreams.find((newStr) => newStr.id === str.id) ?? str)), + [streams, onStreamsChanged] + ); + const onSingleStreamChanged = useCallback( (newValue: SyncSchemaStream) => onStreamsChanged(streams.map((str) => (str.id === newValue.id ? newValue : str))), [streams, onStreamsChanged] @@ -70,7 +76,7 @@ const CatalogTreeComponent: React.FC> ); return ( - + {mode !== "readonly" && }
From 6bc749193f96de0b22219108799a641570241226 Mon Sep 17 00:00:00 2001 From: yatsukbogdan Date: Fri, 3 Feb 2023 13:47:03 +0200 Subject: [PATCH 3/3] Adds functionality to disable CatalogTreeSearch while bulk adi is active --- .../components/connection/CatalogTree/CatalogTreeSearch.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeSearch.tsx b/airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeSearch.tsx index 2c416ac94a9c..86e15cb8969b 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeSearch.tsx +++ b/airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeSearch.tsx @@ -3,6 +3,8 @@ import { useIntl } from "react-intl"; import { Input } from "components/ui/Input"; +import { useBulkEditService } from "hooks/services/BulkEdit/BulkEditService"; + import styles from "./CatalogTreeSearch.module.scss"; interface CatalogTreeSearchProps { @@ -11,10 +13,12 @@ interface CatalogTreeSearchProps { export const CatalogTreeSearch: React.FC = ({ onSearch }) => { const { formatMessage } = useIntl(); + const { isActive } = useBulkEditService(); return (