forked from ddrilling/asb_cloud_front
Исправлен баг с неизменением значения WellTreeSelector при переходе по страницам
This commit is contained in:
parent
da382ba9c8
commit
278ebeb573
@ -61,7 +61,6 @@ export const WellTreeSelector = () => {
|
||||
const history = useHistory()
|
||||
const routeMatch = useRouteMatch('/:route/:id')
|
||||
|
||||
/* eslint-disable react-hooks/exhaustive-deps */
|
||||
useEffect(() => {
|
||||
invokeWebApiWrapperAsync(
|
||||
async () => {
|
||||
@ -87,13 +86,16 @@ export const WellTreeSelector = () => {
|
||||
})),
|
||||
}))
|
||||
setWellsTree(wellsTree)
|
||||
setValue(getLabel(wellsTree, routeMatch?.url))
|
||||
},
|
||||
setShowLoader,
|
||||
`Не удалось загрузить список скважин`
|
||||
)
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
setValue(getLabel(wellsTree, routeMatch?.url))
|
||||
}, [wellsTree, routeMatch])
|
||||
|
||||
const onChange = (value: string): void => {
|
||||
if (wellsTree)
|
||||
setValue(getLabel(wellsTree, value))
|
||||
|
Loading…
Reference in New Issue
Block a user