feat(virtual_table): Auto-reload when injected row leaves viewport
When an injected row has been committed (injected_committed=true) and scrolling moves it out of the visible area: - Sets needs_reload=true in result - Clears injection state This triggers the panel to refetch data from DB, where the new row will appear in its proper sorted position.
This commit is contained in:
parent
08b10486d2
commit
ca187e743e
1 changed files with 12 additions and 0 deletions
|
|
@ -571,6 +571,18 @@ pub fn virtualAdvancedTableRect(
|
|||
}
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// Detectar si la fila inyectada salió del viewport (requiere reload)
|
||||
// =========================================================================
|
||||
if (list_state.hasInjection()) {
|
||||
// Solo hacer reload si la fila ya fue guardada (injected_committed)
|
||||
// y ya no es visible en el viewport actual
|
||||
if (list_state.injected_committed and !list_state.isInjectionVisible(visible_rows)) {
|
||||
result.needs_reload = true;
|
||||
list_state.clearInjection();
|
||||
}
|
||||
}
|
||||
|
||||
// =========================================================================
|
||||
// Tips Proactivos (FASE I): Rotar tips cada ~10 segundos
|
||||
// =========================================================================
|
||||
|
|
|
|||
Loading…
Reference in a new issue