Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <View style ={styles.inside2}>
- {
- this.state.categorias.map((categoria) => {
- return(
- <View key={categoria.id}>
- <CheckBox
- title={categoria.nombre}
- iconRight
- checkedColor='red'
- uncheckedColor='red'
- checked={this.state.checkCategorias[categoria.id-1]}
- containerStyle ={{backgroundColor: '#f7f7f7', borderColor: '#f7f7f7' }}
- textStyle = {{fontSize: 12, color: '#787878' }}
- checkedIcon = 'dot-circle-o'
- uncheckedIcon = 'circle-o'
- onPress = {(checked) => this.cambioCheckCat(categoria.id)}
- />
- {
- this.state.checkCategorias[categoria.id-1] ?
- <View
- style ={{backgroundColor: 'lightgray', width: '100%', height: '100%'}}
- key ={categoria.id+'t'} >
- <Text style = {styles.titulo2}>
- Seleccione una o varias sub-categorias de {categoria.nombre}
- </Text>
- <View style={styles.separador} />
- {
- this.state.subcategorias.map((subcategoria) => {
- if(subcategoria.id_categoria == categoria.id){
- return(
- <CheckBox
- key={subcategoria.id+'s'}
- title={subcategoria.nombre}
- iconRight
- checkedColor='red'
- uncheckedColor='red'
- checked={this.state.checkSubCategorias[i]}
- containerStyle ={{backgroundColor: '#f7f7f7', borderColor: '#f7f7f7' }}
- textStyle = {{fontSize: 12, color: '#787878' }}
- checkedIcon = 'dot-circle-o'
- uncheckedIcon = 'circle-o'
- onPress = {(checked) => this.cambioCheckSub(subcategoria.id)}
- />
- )
- }
- })
- }
- </View> : null
- }
- </View>
- )
- })
- }
- </View>
Add Comment
Please, Sign In to add comment