Home Reference Source Repository
public class | source

List

Extends:

react-native~Component → List

List Compoent

Constructor Summary

Public Constructor
public

Public Constructors

public constructor(props: object) source

Params:

NameTypeAttributeDescription
props object
props.primaryText string

The primary text of a List

props.secondaryText string
  • optional

The secondary text of a List

props.caption string
  • optional

The least distinguishing content.

props.leftIcon Icon
  • optional

Left icon. Size should be 24.

props.rightIcon Icon
  • optional

Right icon. Size should be 24.

props.leftAvatar Avatar
  • optional

Left avatar. Size should be 40.

props.rightAvatar Avatar
  • optional

Right avatar. Size should be 40.

props.lines number
  • optional
  • default: 1

You must specify this prop when secondary lines large than 1. Lines = Secondary lines + 1.

props.primaryColor string
  • optional
  • default: 'rgba(0,0,0,.87)'

The color of primary text.

props.onPress function
  • optional

The primary action of a list. When user press the list will trigger this function.

props.onLeftIconClick function
  • optional

The secondary action of a list. When user press the left icon will trigger this function.

props.onRightIconClick function
  • optional

The secondary action of a list. When user press the right icon will trigger this function.

props.secondaryTextMoreLine {text: string, style: object} []
  • optional

Pass an array when secondary text breaks some lines.