Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix multi numero update voie #843

Merged
merged 2 commits into from
Oct 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion components/grouped-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {normalizeSort} from '@/lib/normalize'
import {positionsTypesList} from '@/lib/positions-types-list'

import BalDataContext from '@/contexts/bal-data'
import MapContext from '@/contexts/map'

import {useInput, useCheckboxInput} from '@/hooks/input'

Expand All @@ -24,6 +25,7 @@ function GroupedActions({idVoie, numeros, selectedNumerosIds, resetSelectedNumer
const [comment, onCommentChange] = useInput('')
const [removeAllComments, onRemoveAllCommentsChange] = useCheckboxInput(false)
const [certifie, setCertifie] = useState(null)
const {reloadTiles} = useContext(MapContext)

const selectedNumeros = numeros.filter(({_id}) => selectedNumerosIds.includes(_id))

Expand Down Expand Up @@ -108,8 +110,9 @@ function GroupedActions({idVoie, numeros, selectedNumerosIds, resetSelectedNumer

setIsLoading(false)
setIsShown(false)
reloadTiles()
resetSelectedNumerosIds()
}, [comment, selectedVoieId, certifie, hasUniqToponyme, selectedToponymeId, onSubmit, positionType, removeAllComments, resetSelectedNumerosIds, baseLocale, selectedNumerosIds, idVoie])
}, [comment, selectedVoieId, certifie, hasUniqToponyme, selectedToponymeId, onSubmit, positionType, removeAllComments, resetSelectedNumerosIds, baseLocale, selectedNumerosIds, idVoie, reloadTiles])

useEffect(() => {
if (!isShown) {
Expand Down
Loading