Skip to content

Commit

Permalink
front: fix invalid trains display
Browse files Browse the repository at this point in the history
  • Loading branch information
SharglutDev committed Nov 16, 2023
1 parent 00daa48 commit c482536
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion front/src/applications/operationalStudies/views/Scenario.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ export default function Scenario() {
const { data: timetable, refetch: refetchTimetable } =
osrdEditoastApi.endpoints.getTimetableById.useQuery(
{ id: timetableId as number },
{ skip: !timetableId }
{
skip: !timetableId,
// This cause the timetable to refetch each time the component mounts
refetchOnMountOrArgChange: true,
}
);

useEffect(() => {
Expand Down

0 comments on commit c482536

Please sign in to comment.