mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-13 13:56:25 +01:00
Hide custom actions field when no applicable models selected
The entire field row is now hidden when no selected object types have registered custom actions, avoiding an empty "Custom actions" label.
This commit is contained in:
2
netbox/project-static/dist/netbox.js
vendored
2
netbox/project-static/dist/netbox.js
vendored
File diff suppressed because one or more lines are too long
6
netbox/project-static/dist/netbox.js.map
vendored
6
netbox/project-static/dist/netbox.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -40,6 +40,12 @@ export function initRegisteredActions(): void {
|
||||
if (noActionsMsg) {
|
||||
noActionsMsg.style.display = anyVisible ? 'none' : 'block';
|
||||
}
|
||||
|
||||
// Hide the entire field row when no actions are visible
|
||||
const fieldRow = actionsContainer!.closest('.field-row, .mb-3');
|
||||
if (fieldRow) {
|
||||
(fieldRow as HTMLElement).style.display = anyVisible ? '' : 'none';
|
||||
}
|
||||
}
|
||||
|
||||
// Initial update
|
||||
|
||||
Reference in New Issue
Block a user