Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Feature: Town name filtering #6983
nielsmh left a comment
Thanks for your contribution! Overall it looks good, there's a few things you should change, mostly cosmetic.
You also need to change the commit message to follow the scheme used, always starting with a keyword (like Add, Change, Fix), a colon, and then the message. Do this with a commit amend in Git, and force-push your branch. (Amending and force-pushing is often frowned upon, but necessary in this case. Github handles it correctly and updates the PR.)
It looks nice. However the sorting doesn't seem to be stable even when I do not change input into the search box (anymore). The resulting list flickers and changes order randomly for me. That doesn't happen with the full list where the entries immediately follow eachother.
I currently can only speculate as to the reasons: I assume a sub-list is generated from the whole list - and display sometimes happens before sorting, but after generation of the sub-list - but most times it happens correctly after sub-list generation and its sorting.
Looks to me you already consider only re-generating the list, when the input field actually changed, though.
Honestly I'm not sure whether this, my observation, is beyond the scope of this patch which just makes use of the existing sort framework. I lean toward "out-of-scope" - yet this makes a bug or race condition visible.