Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪟 🐛 Fixes BulkEditServiceProvider to use filtered streams instead of all streams #21902

Merged
Original file line number Diff line number Diff line change
@@ -30,6 +30,12 @@ const CatalogTreeComponent: React.FC<React.PropsWithChildren<CatalogTreeProps>>

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<React.PropsWithChildren<CatalogTreeProps>>
);

return (
<BulkEditServiceProvider nodes={streams} update={onStreamsChanged}>
<BulkEditServiceProvider nodes={filteredStreams} update={onBatchStreamsChanged}>
<LoadingBackdrop loading={isLoading}>
{mode !== "readonly" && <CatalogTreeSearch onSearch={setSearchString} />}
<div className={classNames(styles.catalogTreeTable, { [styles.newCatalogTreeTable]: isNewTableDesignEnabled })}>