bootgrid: safeguard replace function

(cherry picked from commit 195667f1aa)
This commit is contained in:
Stephan de Wit 2026-05-15 12:51:55 +02:00 committed by Franco Fichtner
parent 04aa6f34ad
commit f50f13ff1c

View file

@ -2244,6 +2244,10 @@ class UIBootgrid {
}
replace(rows) {
if (!Array.isArray(rows) || rows.length === 0) {
throw new Error('Cannot replace without data. Use clear() to clear data, or reload() to refresh');
}
this.table.replaceData(rows);
}