georchestra / mapstore2-cadastrapp

repository for the mapstore2 version of cadastrapp
GNU General Public License v3.0
2 stars 10 forks source link

Problem with plot number sorting #189

Open jusabatier opened 11 months ago

jusabatier commented 11 months ago

Currently plot numbers are sorted as string, not as numbers.

This poses several problems :

When typing a number, for example 3, we have :

image

We should have plot numbers sorted ascending as numbers, so the n°3 should be the first. In practice it is very restrictive to search for certain references with a single number

Same problem here, when sorting by plot number, they're treated as text :

image

Gaetanbrl commented 2 months ago

Plots data needs to be ordered on request return (if backend doesn't):

https://github.com/georchestra/mapstore2-cadastrapp/blob/5ef8f9f66cb983bb7550fc1960c96f263e85a93e/js/extension/components/lists/ReferenceRow.jsx#L39