How to expose table of ManageRelatedRecords to widget

I have a Widget that i'm displaying in the header of a ManageRelatedRecords page, from the widget i want to get access to the table, i used the trait
ExposeTableToWidgets
on the ManageRelatedRecords page and i put that page inside the getTablePage of the widget and i'm getting this error:
Unable to resolve dependency [Parameter #0 [ <required> string|int $record ]] in class Filament\Resources\Pages\ManageRelatedRecords
it works fine if in the getTablePage i put a ListRecords class instead of a ManageRelatedRecords, but in my case it's manage related records page, so how can i do that ? and another problem is trying to get the owner record of the ManageRelatedRecords from the widget, right now i'm passing it as a parameter for the make in the getHeader but i don't know if that's ideal
Was this page helpful?