Table action modal not showing up for some records

Hi everyone! As the title says, I have this table in a Resource's custom page.
    public function table(Table $table): Table
    {
        return $table
            ->query($this->getTableQuery())
            ->columns([
                TableComponents::itemNameColumn()->searchable(),
                // other columns
            ])
            ->actions([
                TableActions::batchOutAction(),
                Action::make('test')->action(fn(Model $record) => dd($record)),
            ]);
    }
    public function getTableQuery()
    {
        return TableQueries::outgoingQuery();
    }

The is the TableQueries::outgoingQuery().
public static function outgoingQuery()
    {
        return Transaction::query()
            ->selectRaw('min(id) as id, item_id, category_id, subcategory_id, exp_date, batch, donor_id, project_id, SUM(amount) as amount, warehouse_id')
            ->groupBy('item_id', 'category_id', 'subcategory_id', 'exp_date', 'batch', 'donor_id', 'project_id', 'warehouse_id')
            ->havingRaw('SUM(amount) > 0');
    }
Was this page helpful?