fix topic dialog not closing

This commit is contained in:
ammarahm-ed
2020-11-26 12:17:37 +05:00
parent 75f8441f0f
commit 96dc6410cd

View File

@@ -65,6 +65,7 @@ export class AddTopicDialog extends React.Component {
onShow={() => { onShow={() => {
this.titleRef.current?.focus(); this.titleRef.current?.focus();
}} }}
statusBarTranslucent={false}
visible={true} visible={true}
onRequestClose={this.close}> onRequestClose={this.close}>
<View <View
@@ -117,7 +118,12 @@ export class AddTopicDialog extends React.Component {
<DialogButtons <DialogButtons
positiveTitle={toEdit ? 'Save' : 'Add'} positiveTitle={toEdit ? 'Save' : 'Add'}
onPressNegative={this.close} onPressNegative={() => {
this.title = null;
this.setState({
visible: false,
});
}}
onPressPositive={this.addNewTopic} onPressPositive={this.addNewTopic}
/> />
</View> </View>