Skip to content

Commit

Permalink
[@mantine/hooks] use-focus-return: Allow shouldReturnFocus to be dyna…
Browse files Browse the repository at this point in the history
…mic (#770)
  • Loading branch information
rtivital committed Aug 23, 2022
1 parent 5324f4d commit 87fccbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mantine-hooks/src/use-focus-return/use-focus-return.ts
Expand Up @@ -40,7 +40,7 @@ export function useFocusReturn({ opened, shouldReturnFocus = true }: UseFocusRet
window.clearTimeout(timeout);
document.removeEventListener('keydown', clearFocusTimeout);
};
}, [opened]);
}, [opened, shouldReturnFocus]);

return returnFocus;
}

0 comments on commit 87fccbd

Please sign in to comment.