From 5b81d821f0db821d6b64a94f36ae31503fabefe6 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 20 Jul 2023 12:54:25 +0800 Subject: [PATCH] set isModalShown context to false on unmount --- src/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/index.js b/src/index.js index 8b5186e1..b977c97d 100644 --- a/src/index.js +++ b/src/index.js @@ -181,6 +181,12 @@ export default class RNPickerSelect extends PureComponent { } }; + componentWillUnmount() { + if (this.context) { + this.context.setIsModalShown(false); + } + } + onUpArrow() { const { onUpArrow } = this.props;