Advertisement
Guest User

Untitled

a guest
Sep 9th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. const testData = [{
  2. label: 'kabel1',
  3. id: 1,
  4. },
  5. {
  6. label: 'label2',
  7. id: 2,
  8. },
  9. {
  10. label: 'label3',
  11. id: 3,
  12. }]
  13.  
  14. <AlphabetFlatList
  15. renderItem={this.renderItem}
  16. data={testData}
  17. getItemLayout={this.getItemLayout}
  18. keyExtractor={(item, index) => {
  19. return item.id;
  20. }}
  21. matchFieldName='label'
  22. mainFlatListContainerStyle={{ flex: 1 }}
  23. alphabetListProps={{
  24. selectedAlphabetTextStyle: {
  25. color: '#fff'
  26. },
  27. selectedAlphabetButtonStyle: {
  28. backgroundColor: '#312783',
  29. height: 50,
  30. width: 50,
  31. borderRadius: 25,
  32. shadowOpacity: 0.5,
  33. shadowOffset: { width: 2, height: 2 },
  34. elevation: 4
  35. },
  36. alphabetButtonStyle: {
  37. backgroundColor: '#fff',
  38. height: 50,
  39. width: 50,
  40. borderRadius: 25,
  41. shadowOpacity: 0.5,
  42. shadowOffset: { width: 2, height: 2 },
  43. elevation: 4
  44. },
  45. alphabetListContainerStyle: {
  46. flex: 0.2
  47. },
  48. showsVerticalScrollIndicator: false
  49. }}
  50. />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement