0👍
Try to do this, but I’m not sure if this is the right solution:
import { scroll } from 'quasar'
const { getScrollTarget, setVerticalScrollPosition } = scroll
watch: {
isLoading: {
deep: true,
handler(isLoading) {
if(isLoading == true) {
Loading.show();
} else {
Loading.hide();
const el = document.querySelector('.q-page-container')
const target = getScrollTarget(el)
const offset = el.offsetTop
const duration = 0
setTimeout(() => setVerticalScrollPosition(target, offset, duration), 400);
}
}
}
}
Documentation https://quasar.dev/quasar-utils/scrolling-utils#scrolling-to-an-element
Source:stackexchange.com