Bind Picker to list of Picker.Item in React Native

后端 未结 6 1709
一向
一向 2020-12-24 14:05

I\'m sure there is a way to do this, but I just can\'t see how yet.

What I\'d like to do, is add a Picker component, but rather than hard-code the list of items, fet

6条回答
  •  离开以前
    2020-12-24 14:52

    You can try this one.

     this.setState({ facilityId: itemValue, facilityPicked: true })}>
          {facilities.map((facility, i) => {
            return 
          })}
    
    

    Here, facilities is a list of object having id and facility_name as key.

提交回复
热议问题