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

Work without alphabetically keyed datasource

Open ssomnoremac opened this issue 9 years ago • 3 comments

Please correct me if I'm missing something but based on the example I need to format my data source to be keyed on the first letter of the word and then also sort the array of values? Shouldn't a tool like this assume do this automatically on a given field within that data? like: sortOn: "user.name"

Let me know if I'm missing something otherwise I'm forking and getting it to work that way.

ssomnoremac avatar Jun 30 '16 20:06 ssomnoremac

It will accept an array also, but it does need to be structured as on object with the keys if you want the sections & ABC jump-to.

I suppose you raise an excellent point. Without those features, why would one use this component?

joshbuchea avatar Jun 30 '16 20:06 joshbuchea

I tried to preserve the ability to use an object but gave up. What I have here is a component that actually requires a field (I need to change that) to sort on and will accept only an array of objects. I think this is a much more common case. I changed theREADME to show an acceptable data source. The side bar doesn't work though. It only pops the list to the top sometimes. Would love some help here before a PR. Thanks!

ssomnoremac avatar Jul 11 '16 19:07 ssomnoremac

@ssomnoremac have u merged this ?

akinolu52 avatar Jun 24 '18 20:06 akinolu52