From 8809438b50d899516a5c98c6b95837aa79e4bbb1 Mon Sep 17 00:00:00 2001 From: Aleksy Date: Sat, 25 May 2024 13:57:58 +0200 Subject: [PATCH 1/3] sending req correclty & added z-index --- .../src/pages/TableListView/TableListView.tsx | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/dqops/src/main/frontend/src/pages/TableListView/TableListView.tsx b/dqops/src/main/frontend/src/pages/TableListView/TableListView.tsx index 4b80b2b502..7814651031 100644 --- a/dqops/src/main/frontend/src/pages/TableListView/TableListView.tsx +++ b/dqops/src/main/frontend/src/pages/TableListView/TableListView.tsx @@ -59,13 +59,18 @@ export default function TableListView() { }; const getTables = async (labels: string[] = []) => { - const addPrefix = (str: string) => { + const addPrefix = (str?: string) => { + if (!str) return ''; return str.includes('*') || str.length === 0 ? str : '*' + str + '*'; }; setLoading(true); + console.log( + connection ? addPrefix(connection) : addPrefix(searchFilters.connection), + schema ? addPrefix(schema) : addPrefix(searchFilters.schema) + ); const res = await SearchApiClient.findTables( - connection ?? addPrefix(searchFilters.connection ?? ''), - schema ?? addPrefix(searchFilters.schema ?? ''), + connection ? addPrefix(connection) : addPrefix(searchFilters.connection), + schema ? addPrefix(schema) : addPrefix(searchFilters.schema), addPrefix(searchFilters.table ?? ''), labels, filters.page, @@ -133,7 +138,7 @@ export default function TableListView() { return ( <> -
+
{!connection && ( onChangeSearchFilters({ connection: e.target.value }) } + className="z-[100]" /> )} {!schema && ( @@ -151,12 +157,14 @@ export default function TableListView() { onChange={(e) => onChangeSearchFilters({ schema: e.target.value }) } + className="z-[100]" /> )} onChangeSearchFilters({ table: e.target.value })} + className="z-[100]" />