MedicOneSystems / MedicOneSystems/livewire-datatables

Sorting is broken after upgrade from v0.9.3 to v0.9.4

Open
#453 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
1.2k
Forks
257
PR merge metrics
No merged PRs in 30d

Description

If I set defaultSort on a column or just leave it unspecified, sorting on any column doesn't work.

If I sort by 'id' cloumn and look at queries in debugbar I see the following:

v0.9.4: select .... order by 'id'                                    <--- this doesn't work and clicking on any column doesn't do anything
v0.9.3: select .... order by `id`                      <--- this works fine and clicking on any column also works as expected

So maybe there was some bug with sql statements introduced in latest release.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue on v0.9.4 with defaultSort both set and unspecified, then inspect the generated SQL in the debugbar and compare it with v0.9.3. Trace the sorting path from a column click and determine where the identifier quoting changes. Done means sorting works and the query uses the working identifier form shown for v0.9.3.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.