callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.73k stars 2.08k forks source link

<List.Item /> left and right doesn't update when in prod #1368

Closed jstansbe closed 4 years ago

jstansbe commented 4 years ago

Environment

"react": "16.9.0", "react-native": "0.61.1", "react-native-paper": "^2.16.0",

Description

When in dev mode everything works as expected, when a list item is pressed the onPress event fires and the right Icon toggles between the checked and unchecked icon. However, when I build the app for release nothing changes when the onPress event fires. (on press toggles the item's selected value).

            <List.Item
                title={item.name}
                onPress={this._onPress}
                left={props => <List.Icon {...props} icon={'school'} />}
                right={props => <List.Icon {...props} icon={item.selected ? 'check-box' : 'check-box-outline-blank'} color={item.selected ? Theme.colors.lightBlue : Theme.colors.charcoal} />}
            />
Trancever commented 4 years ago

@jstansbe Can you provide minimal reproducible repo?

jstansbe commented 4 years ago

Closing as i'm unable to reproduce at this time