Skip to content

Commit

Permalink
front: reset selected simulation when new one is created
Browse files Browse the repository at this point in the history
  • Loading branch information
Akctarus committed Jul 11, 2024
1 parent 9c64f1c commit c8cc2d3
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useEffect, useState } from 'react';

import { Button } from '@osrd-project/ui-core';
import { useTranslation } from 'react-i18next';
Expand Down Expand Up @@ -30,6 +30,10 @@ const StcdmResultsTable = ({
setIsSimulationSelected(true);
};

useEffect(() => {
setIsSimulationSelected(false);
}, [stdcmData]);

const handleShowAllClick = () => {
setShowAllOP((prevState) => !prevState);
};
Expand Down

0 comments on commit c8cc2d3

Please sign in to comment.