mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
Merge pull request #412 from Unleash/fix/scroll-to-top
fix scroll-top when create strategy
This commit is contained in:
commit
3c5070e92f
@ -17,6 +17,7 @@ import FeatureStrategyCreateExecution from '../../FeatureStrategyCreateExecution
|
|||||||
import { PRODUCTION } from '../../../../../../constants/environmentTypes';
|
import { PRODUCTION } from '../../../../../../constants/environmentTypes';
|
||||||
import { ADD_NEW_STRATEGY_SAVE_ID } from '../../../../../../testIds';
|
import { ADD_NEW_STRATEGY_SAVE_ID } from '../../../../../../testIds';
|
||||||
import useFeature from '../../../../../../hooks/api/getters/useFeature/useFeature';
|
import useFeature from '../../../../../../hooks/api/getters/useFeature/useFeature';
|
||||||
|
import { scrollToTop } from '../../../../../common/util';
|
||||||
|
|
||||||
interface IFeatureStrategiesConfigure {
|
interface IFeatureStrategiesConfigure {
|
||||||
setToastData: React.Dispatch<React.SetStateAction<IToastType>>;
|
setToastData: React.Dispatch<React.SetStateAction<IToastType>>;
|
||||||
@ -97,6 +98,7 @@ const FeatureStrategiesConfigure = ({
|
|||||||
});
|
});
|
||||||
history.replace(history.location.pathname);
|
history.replace(history.location.pathname);
|
||||||
refetch();
|
refetch();
|
||||||
|
scrollToTop();
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
setToastData({
|
setToastData({
|
||||||
show: true,
|
show: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user