Sorting on pages by columns different then "id" doesn't work with resource IndexPage and throws errorAfter deleting setColumn method then don't throws error, but sorting works by 'id'
Current solution: duplicate fields with sortable callback directly in fields method of resource.
Steps To Reproduce
AssetQueryBuilder methods
public function orderByEmployeeName($direction = 'asc'): self
{
return $this->select('assets.*')
->join('employees', 'assets.employee_id', '=', 'employees.id')
->orderBy('employees.name', $direction);
}
public function orderByCategoryName($direction = 'asc'): self
{
return $this->select('assets.*')
->join('asset_categories', 'assets.asset_category_id', '=', 'asset_categories.id')
->orderBy('asset_categories.name', $direction);
}
Method fields in AssetIndexPage. Sorting by Employee.name and AssetCategory.name don't works
MoonShine Version
2.20.4
Laravel Version
11.20.0
PHP Version
8.3.10
Database Driver & Version
MariaDB 10.11.7
Description
Sorting on pages by columns different then "id" doesn't work with resource IndexPage and throws error After deleting setColumn method then don't throws error, but sorting works by 'id'
Current solution: duplicate fields with sortable callback directly in fields method of resource.
Steps To Reproduce
AssetQueryBuilder methods