fix(centralui): stabilize audit grid th nodes with @key; doc grid limitations

This commit is contained in:
Joseph Doherty
2026-05-21 06:33:20 -04:00
parent f1478c5a19
commit c503df4c4c
3 changed files with 31 additions and 0 deletions

View File

@@ -17,7 +17,13 @@
<tr>
@foreach (var col in OrderedColumns())
{
// @key keeps Blazor reusing one DOM node per column across
// re-renders (reorder/resize), so audit-grid.js binds drag
// listeners exactly once per <th> and never leaks them onto
// discarded nodes — the __auditGridCellBound guard relies on
// this node stability to be fully sound.
<th class="audit-grid-th"
@key="col.Key"
data-test="col-header-@col.Key"
data-col-key="@col.Key"
style="@ColumnWidthStyle(col.Key)">