Skip to content

Bug addSort #609

@inZaneX

Description

@inZaneX

https://github.com/MedicOneSystems/livewire-datatables/blob/cfb4d800e39df96202564fe947e6046e6b8c52c1/src/Http/Livewire/LivewireDatatable.php#L1607C54-L1607C56

it should look like this:

$this->query->orderBy(DB::raw('FIELD('.$this->query->from.'.id,' . implode(',', $this->pinnedRecords) . ')'), 'DESC');

Otherwise it could stop working if you use more relations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions