react-native-alphabetlistview icon indicating copy to clipboard operation
react-native-alphabetlistview copied to clipboard

Order in alphabet sidebar

Open marxsk opened this issue 7 years ago • 4 comments

Hi,

thanks for a great component. I have found two minor issues and if they are bugs, I can try to fix them but it is possible that I have just overlooked something.

Let's assume that we will just copy an example from main page. When we switch lines in state.data, we can get situation where sidebar is not in alphabet order. For hash that were created outside of project, it is hard to put items in an alphabet order (and order of keys in hash is not defined in ECMAscript). Should these keys be ordered?

Some languages (e.g. Czech) uses letters in alphabet that consist of multiple characters (e.g Ch). Currently, this is badly displayed on two lines at sidebar, will you accept a PR that will support multi-character letters? For usage with previous automatic ordering, it is possible to use localeCompare() that handles this without any issues.

Thanks

marxsk avatar Jul 14 '16 12:07 marxsk

Feel free to PR. And since I don't have much time to review, I am considering to transfer this repo. Are you interested? @marxsk

sunnylqm avatar Jul 15 '16 13:07 sunnylqm

@sunnylqm I'm willing to help improve this package, could u add me as a contributor?

sibelius avatar Oct 06 '16 19:10 sibelius

@sibelius welcome

sunnylqm avatar Oct 07 '16 08:10 sunnylqm

I came here to ask about alphabetic order as well. Either there should be a sort function passed to the component, it should sort alphabetically by default, or it should be passed an array instead of an object. While some libraries do, it's kind of bad practice to rely on Object property ordering in JavaScript - it can be inconsistent between runtimes, since its order is not specified in the spec.

jacob-israel-turner avatar Jan 02 '19 20:01 jacob-israel-turner