1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

Merge pull request #412 from Unleash/fix/scroll-to-top

fix scroll-top when create strategy
This commit is contained in:
Youssef Khedher 2021-10-12 10:00:56 +01:00 committed by GitHub
commit 3c5070e92f

View File

@ -17,6 +17,7 @@ import FeatureStrategyCreateExecution from '../../FeatureStrategyCreateExecution
import { PRODUCTION } from '../../../../../../constants/environmentTypes';
import { ADD_NEW_STRATEGY_SAVE_ID } from '../../../../../../testIds';
import useFeature from '../../../../../../hooks/api/getters/useFeature/useFeature';
import { scrollToTop } from '../../../../../common/util';
interface IFeatureStrategiesConfigure {
setToastData: React.Dispatch<React.SetStateAction<IToastType>>;
@ -97,6 +98,7 @@ const FeatureStrategiesConfigure = ({
});
history.replace(history.location.pathname);
refetch();
scrollToTop();
} catch (e) {
setToastData({
show: true,