wrking on scroll up at last item

This commit is contained in:
Peter Olu 2022-04-24 09:29:14 +01:00
parent 949a7feb97
commit 1239fed5dd

View File

@ -189,6 +189,7 @@ export default defineComponent({
const tabRef = ref<any>(""); const tabRef = ref<any>("");
const tabObserveContainer = ref<any>(null); const tabObserveContainer = ref<any>(null);
const currentItem = ref(""); const currentItem = ref("");
const lastItem = ref("");
const l = dashboardStore.layout.findIndex( const l = dashboardStore.layout.findIndex(
(d: LayoutConfig) => d.i === props.data.i (d: LayoutConfig) => d.i === props.data.i
); );
@ -248,6 +249,11 @@ export default defineComponent({
() => { () => {
setTimeout(() => { setTimeout(() => {
observeItems(); observeItems();
lastItem.value = `${
dashboardStore.currentTabItems[
dashboardStore.currentTabItems.length - 1
].i
}`;
}, 500); }, 500);
} }
); );