React-native-picker-select: Unable to set placeholder dynamically

Created on 23 Dec 2019  路  2Comments  路  Source: lawnstarter/react-native-picker-select

placeholder={{responsiblePlayLimits.depositLimit || '500',}

Most helpful comment

@chetna-webonise Set the placeholder like this
placeholder={{ label: 'Select Gender', value: null, color: '#909090', }}
example:

        <RNPickerSelect style = {{width:wp('75%'),color:'#909090', height:hp('7%'), marginLeft:wp(5)}}
            onValueChange={(value) => console.log(value)}
            placeholder={{
            label: 'Select Gender',
            value: null,
            color: '#909090',
        }}
            items={[
                { label: 'Male', value: 'male', color: '#909090' },
                { label: 'Female', value: 'female', color: '#909090' },
            ]}
        />

All 2 comments

Possibly related to #178 Use the bug report template if not

@chetna-webonise Set the placeholder like this
placeholder={{ label: 'Select Gender', value: null, color: '#909090', }}
example:

        <RNPickerSelect style = {{width:wp('75%'),color:'#909090', height:hp('7%'), marginLeft:wp(5)}}
            onValueChange={(value) => console.log(value)}
            placeholder={{
            label: 'Select Gender',
            value: null,
            color: '#909090',
        }}
            items={[
                { label: 'Male', value: 'male', color: '#909090' },
                { label: 'Female', value: 'female', color: '#909090' },
            ]}
        />

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fleuv picture Fleuv  路  8Comments

dakairus picture dakairus  路  3Comments

gregogalante picture gregogalante  路  4Comments

milennaj picture milennaj  路  9Comments

sidraval picture sidraval  路  9Comments