Part-DB-server icon indicating copy to clipboard operation
Part-DB-server copied to clipboard

Column sorting incorrect

Open Volkerti opened this issue 8 months ago • 0 comments

Describe the bug Column sorting is incorrect. If an extra column is activated, every try to sort columns by clicking the header sorts the next following column.

To Reproduce Steps to reproduce the behavior:

  1. Go to a "Category" or "Storage location" and display all parts therein
  2. My standard columns are (in this order): "Name", "Description", "Category", "Footprint", "Manufacturer", "Storage locations", "Amount"
  3. Click on the tooth wheel and select "MPN" (I didn't try any other field) as additional column to display.
  4. Find "MPN" as last column
  5. Try to sort for "MPN" by clicking on the column header --> Does not sort
  6. Re-arrange columns by dragging column "MPN" to another position, e.g. between columns "Manufacturer" and "Storage locations"
  7. Try sorting different columns. Everything left of and including "Manufacturer" sorts well. If "MPN" column header is clicked, the table is sorted for column "Storage" (the NEXT column).
  8. Every click on a header right of and including "MPN" sorts the NEXT column.

Screenshots Image Correctly sorted

Image Click on "MPN" sorts next column

Server Side Behaviour is reproducible on Part-DB German Demo server

My setup:

  • Part-DB Version: 1.17.0
  • PHP Version: 8.3.19 (SAPI: fpm-fcgi)
  • Server Operating System: Linux partdb-1 4.4.302+ #69057 SMP Fri Jan 12 17:02:59 CST 2024 x86_64
  • Database Server: mysql 10.11.6-MariaDB

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Google Chrome
  • Version Version 135.0.7049.115 (Official Build) (64-bit)

Additional context Seems like an column indexing problem. I did not try with more than 1 additional column. Don't know if this would cause this "sorting effect" shifted two columns.

Volkerti avatar Apr 29 '25 12:04 Volkerti