Files
filament/docs
arzcode 11ef6c6a88 Add deferred badge loading for relation manager tabs (#19464)
* feat: add deferred badge loading for relation manager tabs

Extends the deferred tab badge loading introduced in PR #19336 to
relation manager tabs, fixing two upstream issues:

1. `RelationManager::getTabComponent()` was evaluating `getBadge()`
   eagerly before the deferred mechanism could intercept it.
2. `HasRelationManagers::getRelationManagersContentComponent()` built
   `Tabs::make()` with no key, causing `callSchemaComponentMethod()` to
   receive null when the async badge fetch fired.

Changes:
- Add `protected static bool $deferBadge = false` to `RelationManager`
  with an overrideable `isBadgeDeferred()` method for per-record control
- Add fluent `->deferBadge()` and `isBadgeDeferred()` to `RelationGroup`
- Add `->key('relationManagerTabs')` to the `Tabs` built in
  `HasRelationManagers`
- Add docs and tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* cleanup

---------

Co-authored-by: buzkall <buzkall@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
2026-04-20 13:24:09 +01:00
..
2026-03-04 10:37:29 +01:00
2026-03-23 08:29:46 +00:00
2025-02-22 19:16:37 +00:00