Revert "Enhance infinite scroll functionality; increase sentinel height and ensure full width, trigger layout recalculation on initialization."

This reverts commit a1e9e440ed.
This commit is contained in:
Will Miao
2025-03-11 14:47:15 +08:00
parent d63a70474b
commit be5e8bad17
2 changed files with 3 additions and 10 deletions

View File

@@ -22,15 +22,8 @@ export function initializeInfiniteScroll() {
} else {
const sentinel = document.createElement('div');
sentinel.id = 'scroll-sentinel';
sentinel.style.height = '20px'; // Increase height a bit
sentinel.style.width = '100%'; // Ensure full width
sentinel.style.position = 'relative'; // Ensure it's in the normal flow
sentinel.style.height = '10px';
document.getElementById('loraGrid').appendChild(sentinel);
state.observer.observe(sentinel);
}
// Force layout recalculation
setTimeout(() => {
window.dispatchEvent(new Event('resize'));
}, 100);
}
}

View File

@@ -85,7 +85,7 @@
{% else %}
{% include 'components/controls.html' %}
<!-- Lora卡片容器 -->
<div class="card-grid" id="loraGrid" style="height: calc(100vh - [header-height]px); overflow-y: auto;">
<div class="card-grid" id="loraGrid">
<!-- Cards will be dynamically inserted here -->
</div>
<!-- Bulk operations panel will be inserted here by JavaScript -->