update dialog

This commit is contained in:
ammarahm-ed
2021-01-13 13:23:01 +05:00
parent 4e4aaea9e9
commit 1bd53c0572

View File

@@ -54,6 +54,7 @@ export class AddNotebookDialog extends React.Component {
this.hiddenInput = createRef();
this.topicInputRef = createRef();
this.addingTopic = false;
}
open = () => {
@@ -214,7 +215,6 @@ export class AddNotebookDialog extends React.Component {
topics: prevTopics,
});
this.currentInputValue = null;
//console.log('edit topic is', this.state.editTopic);
if (this.state.editTopic) {
this.topicInputRef.current?.blur();
Keyboard.dismiss();
@@ -232,7 +232,9 @@ export class AddNotebookDialog extends React.Component {
}, 30);
}
}
this.topicInputRef.current?.setNativeProps({
text:''
})
this.topicInputRef.current?.focus();
};
@@ -321,7 +323,6 @@ export class AddNotebookDialog extends React.Component {
<Input
fwdRef={this.topicInputRef}
testID={notesnook.ids.dialogs.notebook.inputs.topic}
clearTextOnFocus={true}
onChangeText={(value) => {
this.currentInputValue = value;
if (this.prevItem !== null) {