Fixed scroll issue while configuring workflow (#23142)
This commit is contained in:
@@ -109,6 +109,15 @@ function WorkflowPage({ workflow: workflowId }: PageProps) {
|
||||
|
||||
const isPending = isPendingWorkflow || isPendingEventTypes;
|
||||
|
||||
useEffect(() => {
|
||||
requestAnimationFrame(() => {
|
||||
window.scrollTo({
|
||||
top: 0,
|
||||
behavior: "smooth",
|
||||
});
|
||||
});
|
||||
}, [isPending]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isPending) {
|
||||
setFormData(workflow);
|
||||
|
||||
Reference in New Issue
Block a user