Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion assets/plugins/features/item-detail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ export class ItemDetailPlugin implements DatagridPlugin {
onDatagridInit(datagrid: Datagrid): boolean {
datagrid.el.querySelectorAll<HTMLElement>("[data-toggle-detail-grid]")
.forEach((el) => {
if (el.getAttribute("data-toggle-detail-grid") !== datagrid.name) return;
// datagrid.name comes from data-datagrid-name, which holds the component full name.
// data-toggle-detail-grid only holds the plain name, so it never matches for a datagrid
// nested in another component - prefer the full name attribute.
const gridName = el.getAttribute("data-toggle-detail-grid-fullname")
?? el.getAttribute("data-toggle-detail-grid");

if (gridName !== datagrid.name) return;
const toggleId = el.getAttribute("data-toggle-detail")!;


Expand Down
Loading