Skip to content

Commit eae0585

Browse files
authored
Merge pull request #13 from bernhardoj/fix/modal-shown-context-state
Fix picker still avoiding view when the picker itself is unmounted
2 parents 107b378 + 5b81d82 commit eae0585

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ export default class RNPickerSelect extends PureComponent {
181181
}
182182
};
183183

184+
componentWillUnmount() {
185+
if (this.context) {
186+
this.context.setIsModalShown(false);
187+
}
188+
}
189+
184190
onUpArrow() {
185191
const { onUpArrow } = this.props;
186192

0 commit comments

Comments
 (0)