fix(cms): stabilize _specialColumns allocation and refresh stale comments
Allocate _specialColumns once in OnInitialized; update RowActions references to SpecialColumns in the medium browsers and base class.
This commit is contained in:
@@ -9,9 +9,10 @@
|
||||
@* Embedded as the SESSIONS tab content of the Release Archive (Phase 9 §8.A), and still routable at
|
||||
/tracks/sessions for direct-URL access. The grid is the rich CmsAlbumBrowser filtered to Sessions
|
||||
(§8.C parity: expand-tracks, delete, Type chip, per-row edit), with the Session hero upload supplied
|
||||
as its medium-specific RowActions slot so that affordance survives the move off the thin table. When
|
||||
embedded, the page chrome (title, container, the now-meaningless "Back to Release Archive" button) is
|
||||
suppressed; the standalone route keeps it. The hero affordance (9.5.E) is preserved in both contexts. *@
|
||||
as its medium-specific special-action column so that affordance survives the move off the thin table.
|
||||
When embedded, the page chrome (title, container, the now-meaningless "Back to Release Archive"
|
||||
button) is suppressed; the standalone route keeps it. The hero affordance (9.5.E) is preserved in
|
||||
both contexts. *@
|
||||
@if (Embedded)
|
||||
{
|
||||
@GridContent
|
||||
@@ -61,10 +62,15 @@ else
|
||||
OnReleasesChanged="ReloadAsync"
|
||||
SpecialColumns="_specialColumns" />;
|
||||
|
||||
private IReadOnlyList<SpecialActionColumn> _specialColumns => new[]
|
||||
// Allocated once per component instance in OnInitialized (field initializers cannot reference
|
||||
// instance members, so initialization is deferred to the first lifecycle hook).
|
||||
private IReadOnlyList<SpecialActionColumn> _specialColumns = Array.Empty<SpecialActionColumn>();
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
new SpecialActionColumn("Hero", HeroCell)
|
||||
};
|
||||
_specialColumns = new[] { new SpecialActionColumn("Hero", HeroCell) };
|
||||
base.OnInitialized();
|
||||
}
|
||||
|
||||
// Per-row cell for the dedicated "Hero" column: thumbnail preview plus set/replace upload button with
|
||||
// progress. Recovers the typed SessionRow via RowFor; skips rendering for a release not on the page.
|
||||
|
||||
Reference in New Issue
Block a user