forked from ddrilling/asb_cloud_front
Исправлена ошибка поиска значения для WellTreeSelector
This commit is contained in:
parent
f5c6496d38
commit
a824bddbc4
@ -33,7 +33,7 @@ const getLabel = (wellsTree: any[], value?: string): string | undefined => {
|
|||||||
switch (type) {
|
switch (type) {
|
||||||
case 'cluster':
|
case 'cluster':
|
||||||
deposit = wellsTree.find((deposit) => (
|
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)
|
if (deposit && cluster)
|
||||||
return `${deposit.title} / ${cluster.title}`
|
return `${deposit.title} / ${cluster.title}`
|
||||||
@ -41,7 +41,7 @@ const getLabel = (wellsTree: any[], value?: string): string | undefined => {
|
|||||||
case 'well':
|
case 'well':
|
||||||
deposit = wellsTree.find((deposit) => (
|
deposit = wellsTree.find((deposit) => (
|
||||||
cluster = deposit.children?.find((cluster: any) => (
|
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)
|
if (deposit && cluster && well)
|
||||||
|
Loading…
Reference in New Issue
Block a user