React-native-contacts: sort name list alphabetic

Created on 18 Sep 2019  路  1Comment  路  Source: morenoh149/react-native-contacts

when i use react-native-contacts , the list doesn't appear alphabetic names
any solution about this?

Most helpful comment

@luism3861 sort in application code after you load the contacts

contacts.sort((a, b) => a.first_name.toLowerCase() < b.first_name.toLowerCase());

>All comments

@luism3861 sort in application code after you load the contacts

contacts.sort((a, b) => a.first_name.toLowerCase() < b.first_name.toLowerCase());
Was this page helpful?
0 / 5 - 0 ratings