diff --git a/src/components/WellTreeSelector.tsx b/src/components/WellTreeSelector.tsx index 7111b8c..b8ceb00 100644 --- a/src/components/WellTreeSelector.tsx +++ b/src/components/WellTreeSelector.tsx @@ -33,7 +33,7 @@ const getLabel = (wellsTree: any[], value?: string): string | undefined => { switch (type) { case 'cluster': deposit = wellsTree.find((deposit) => ( - cluster = deposit.children?.find((cluster: any) => cluster.value === value) + cluster = deposit.children?.find((cluster: any) => cluster.key === value) )) if (deposit && cluster) return `${deposit.title} / ${cluster.title}` @@ -41,7 +41,7 @@ const getLabel = (wellsTree: any[], value?: string): string | undefined => { case 'well': deposit = wellsTree.find((deposit) => ( cluster = deposit.children?.find((cluster: any) => ( - well = cluster.children?.find((well: any) => well.value === value) + well = cluster.children?.find((well: any) => well.key === value) )) )) if (deposit && cluster && well)