[Bug]: Property Labels Bleeding/Mixing Between Resources During Navigation
Contact Details
What happened?
When navigating between different AdminJS resources that have the same property names but different labels, the labels get mixed up. For example, if Resource A has createdAt labeled as "Scan Upload Date" and Resource B has createdAt labeled as "Upload Date", after navigating from Resource B back to Resource A, Resource A will incorrectly show "Upload Date" instead of "Scan Upload Date".
What I expected:
Each resource should maintain its own property labels regardless of the navigation order. Resource A should always show "Scan Upload Date" and Resource B should always show "Upload Date", no matter how many times you navigate between them.
Bug prevalence
This happens consistently (100% of the time) when navigating between resources that share property names but have different labels. The issue appears immediately after navigation and persists until a hard browser refresh.
AdminJS dependencies version
{
"adminjs": "^7.8.13",
"@adminjs/design-system": "^4.1.1",
"@adminjs/express": "^6.1.1",
"@adminjs/import-export": "^3.0.0",
"@adminjs/sequelize": "^4.1.1",
"sequelize": "^6.37.5",
"pg": "^8.13.1",
"express": "^4.21.2",
"node": "24.x"
}
### What browsers do you see the problem on?
Chrome
### Relevant log output
```bash
No console errors are shown. The issue occurs silently. However, if you inspect the DOM, you'll see that the column headers change dynamically when navigating between resources.
Relevant code that's giving you issues
// Minimal reproduction of property label bleeding issue
// Resource 1: First resource with custom createdAt label
const resourceOne = {
resource: ModelOne, // Any Sequelize model
options: {
id: "resource_one",
properties: {
createdAt: {
label: "Custom Date Label", // This label will be overridden
isVisible: { list: true, filter: true, show: true, edit: false }
},
id: {
label: "First ID",
isVisible: { list: true, filter: true, show: true, edit: false }
}
}
}
};
// Resource 2: Second resource with different createdAt label
const resourceTwo = {
resource: ModelTwo, // Any other Sequelize model
options: {
id: "resource_two",
properties: {
createdAt: {
label: "Different Date Label", // This will override the above
isVisible: { list: true, filter: true, show: true, edit: false }
},
id: {
label: "Second ID",
isVisible: { list: true, filter: true, show: true, edit: false }
}
}
}
};
// AdminJS setup
const admin = new AdminJS({
resources: [resourceOne, resourceTwo],
rootPath: "/admin"
});
// Steps to reproduce:
// 1. Navigate to /admin/resources/resource_one
// - Column shows "Custom Date Label" ✓ (correct)
// 2. Navigate to /admin/resources/resource_two
// - Column shows "Different Date Label" ✓ (correct)
// 3. Navigate back to /admin/resources/resource_one
// - Column now shows "Different Date Label" ✗ (wrong!)
// - Expected: "Custom Date Label"
// The issue occurs because AdminJS internally shares property configurations
// between resources, causing labels to "bleed" from one resource to another
https://github.com/SoftwareBrothers/adminjs/pull/1757
please merge this PR. It will fix the above issue. 🙏
Thanks.
please merge this PR. It will fix the above issue. 🙏
Thanks.
I'll test it tomorrow, and if everything works correctly, I'll go ahead and merge it.