From 9cc77fb3a1ed82a98a695fe530adad688b708689 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Mon, 3 Aug 2026 16:01:50 +0300 Subject: [PATCH] =?UTF-8?q?CardView=20lookup=20=C3=A7a=C4=9Fr=C4=B1s=C4=B1?= =?UTF-8?q?=20d=C3=BCzeltildi.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/views/list/CardView.tsx | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/ui/src/views/list/CardView.tsx b/ui/src/views/list/CardView.tsx index a16bdca1..3cfdcf9c 100644 --- a/ui/src/views/list/CardView.tsx +++ b/ui/src/views/list/CardView.tsx @@ -213,7 +213,6 @@ const getInitialExtraFilters = (gridDto?: GridDto): GridExtraFilterState[] => const loadCascadeLookupDisplayValues = async ( columns: any[], rows: Record[], - knownValues: Record> = {}, ) => { const entries = await Promise.all( columns @@ -224,27 +223,9 @@ const loadCascadeLookupDisplayValues = async ( .split(',') .map((field) => field.trim()) .filter(Boolean) - const parentValueLists: string[][] = parentFields.map((field) => { - const values = Object.entries(knownValues).find( - ([key]) => key.toLowerCase() === field.toLowerCase(), - )?.[1] - return values ? [...values.keys()] : [] - }) - const preloadContexts = parentValueLists.every((values) => values.length > 0) - ? parentValueLists.reduce[]>( - (contexts, values, index) => - contexts - .flatMap((context) => - values.map((value) => ({ ...context, [parentFields[index]]: value })), - ) - .slice(0, 100), - [{}], - ) - : [] - const sourceRows = rows.length > 0 ? rows : preloadContexts const contexts = [ ...new Map( - sourceRows.map((row) => [ + rows.map((row) => [ JSON.stringify(parentFields.map((field: string) => getValueByField(row, field))), row, ]), @@ -719,10 +700,6 @@ const CardView = (props: CardViewProps) => { let active = true const columns = getLookupColumns() loadLookupDisplayValues(columns) - .then(async (values) => ({ - ...values, - ...(await loadCascadeLookupDisplayValues(columns, [], values)), - })) .then((values) => { if (!active) return applyLookupDisplayValues(values)