Skip to content

Commit

Permalink
minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Nov 16, 2023
1 parent 95e149f commit 4863b15
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ui/app/mirrors/edit/[mirrorId]/tablePairs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@ import { useMemo, useState } from 'react';
const TablePairs = ({ tables }: { tables?: TableMapping[] }) => {
const [searchQuery, setSearchQuery] = useState<string>('');
const shownTables = useMemo(() => {
const shownTables = tables?.filter((table: TableMapping) => {
return (
const shownTables = tables?.filter(
(table: TableMapping) =>
table.sourceTableIdentifier.includes(searchQuery) ||
table.destinationTableIdentifier.includes(searchQuery)
);
});
);
return shownTables?.length ? shownTables : tables;
}, [tables, searchQuery]);
if (tables)
Expand Down

0 comments on commit 4863b15

Please sign in to comment.