1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-16 07:38:18 +09:00

fix(client): Pagination prepend not working on containers without scrolling

This commit is contained in:
ltlapy 2022-07-06 20:42:56 +09:00
parent aabf12038c
commit c58f2a7d15

View File

@ -192,8 +192,9 @@ const prepend = (item: Item): void => {
if (props.pagination.reversed) { if (props.pagination.reversed) {
if (rootEl.value) { if (rootEl.value) {
const container = getScrollContainer(rootEl.value); const container = getScrollContainer(rootEl.value);
if (container == null) return; // TODO? if (container == null) {
// TODO?
} else {
const pos = getScrollPosition(rootEl.value); const pos = getScrollPosition(rootEl.value);
const viewHeight = container.clientHeight; const viewHeight = container.clientHeight;
const height = container.scrollHeight; const height = container.scrollHeight;
@ -210,6 +211,7 @@ const prepend = (item: Item): void => {
} }
} }
} }
}
items.value.push(item); items.value.push(item);
// TODO // TODO
} else { } else {