April 2017
Intermediate to advanced
414 pages
8h 14m
English
Here's what I did to get the button to clear a selected date and expand/collapse our cells to play nicely:
// Tasks/app/components/EditTask/index.js ... import { Button, ... } from 'react-native'; ... export default class EditTask extends Component { constructor (props) { ... this.state = { ... expanded: false } } render () { ... return ( <View style={ styles.editTaskContainer }> <View style={ [styles.expandableCellContainer, { maxHeight: this.state.expanded ? this.state.datePickerHeight : 40 }]}>
I wrapped a new View around ExpandableCell. Its styling is modified based on the expanded Boolean in the state of EditTask. If the component is expanded, then its maxHeight property is set to the height ...
Read now
Unlock full access