filterSort function file was not shaped correctly for the world_countries_lists package used in primary example of this library - it tried to sort by a non-existing key property, instead by name.
It was overwriting any sorting provided by areaSorter prop of a .
Because alphabetical sorting of countries in a prefix dropdown should be a default behaviour, i set a function from example to be a defaultAreaSorter.
I have not changed the implementation for a lite version, but i think it should be adjusted as well and finally, we should distinguish it between the lite and antd versions, as typing of their filtering functions is a bit different. That is why i moved filterSort function from ./shared to area-select.lite.
Solves #58
There are two points of this PR:
filterSort
function file was not shaped correctly for theworld_countries_lists
package used in primary example of this library - it tried to sort by a non-existing key property, instead by name.It was overwriting any sorting provided by areaSorter prop of a.
Because alphabetical sorting of countries in a prefix dropdown should be a default behaviour, i set a function from example to be a
defaultAreaSorter
.I have not changed the implementation for a lite version, but i think it should be adjusted as well and finally, we should distinguish it between the lite and antd versions, as typing of their filtering functions is a bit different. That is why i moved
filterSort
function from./shared
toarea-select.lite
.