refactor: add function resetScrollBar

This commit is contained in:
Net 2024-09-05 10:37:14 +07:00
parent 18059db8a0
commit 47d775ca58
4 changed files with 27 additions and 10 deletions

View file

@ -226,4 +226,12 @@ export function isRoleInclude(role2check: string[]): boolean {
return isIncluded;
}
export function resetScrollBar(elementId: string) {
const element = document.getElementById(elementId);
if (element) {
element.scrollTop = 0;
}
}
export default useUtilsStore;