Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

update input keyboard return key labels

ammarahm-ed76a44aa61a26
diff --git a/apps/mobile/src/components/AddNotebookDialog/index.js b/apps/mobile/src/components/AddNotebookDialog/index.js
index 4116326c0..7915222da 100644
--- a/apps/mobile/src/components/AddNotebookDialog/index.js
+++ b/apps/mobile/src/components/AddNotebookDialog/index.js
@@ -320,6 +320,8 @@ export class AddNotebookDialog extends React.Component {
onSubmit={() => {
this.descriptionRef.focus();
}}
+ returnKeyLabel="Next"
+ returnKeyType="next"
defaultValue={toEdit ? toEdit.title : null}
/>
@@ -333,6 +335,8 @@ export class AddNotebookDialog extends React.Component {
onSubmit={() => {
this.topicInputRef.current?.focus();
}}
+ returnKeyLabel="Next"
+ returnKeyType="next"
defaultValue={toEdit ? toEdit.description : null}
/>
@@ -350,6 +354,8 @@ export class AddNotebookDialog extends React.Component {
});
}
}}
+ returnKeyLabel="Done"
+ returnKeyType="done"
onSubmit={() => {
this.onSubmit();
}}
diff --git a/apps/mobile/src/components/AddTopicDialog/index.js b/apps/mobile/src/components/AddTopicDialog/index.js
index f8530e29b..18dc32092 100644
--- a/apps/mobile/src/components/AddTopicDialog/index.js
+++ b/apps/mobile/src/components/AddTopicDialog/index.js
@@ -128,6 +128,8 @@ export class AddTopicDialog extends React.Component {
defaultValue={this.toEdit ? this.toEdit.title : null}
placeholder="Enter title of topic"
onSubmit={() => this.addNewTopic()}
+ returnKeyLabel="Done"
+ returnKeyType="done"
/>
<DialogButtons
diff --git a/apps/mobile/src/components/SearchInput/index.js b/apps/mobile/src/components/SearchInput/index.js
index e821f0717..ab9046289 100644
--- a/apps/mobile/src/components/SearchInput/index.js
+++ b/apps/mobile/src/components/SearchInput/index.js
@@ -53,6 +53,8 @@ export const SearchInput = (props) => {
paddingHorizontal: 0,
margin: 0,
}}
+ returnKeyLabel="Search"
+ returnKeyType="search"
textAlignVertical="center"
onChangeText={onChangeText}
multiline={false}
diff --git a/apps/mobile/src/components/VaultDialog/index.js b/apps/mobile/src/components/VaultDialog/index.js
index b6f277873..b225ab1b0 100644
--- a/apps/mobile/src/components/VaultDialog/index.js
+++ b/apps/mobile/src/components/VaultDialog/index.js
@@ -333,7 +333,6 @@ export class VaultDialog extends Component {
this.setState({
loading: false,
});
-
}
}
@@ -608,6 +607,13 @@ export class VaultDialog extends Component {
? 0
: 10
}
+ onSubmit={() => {
+ changePassword
+ ? changePassInputRef.current?.focus()
+ : this.onPress;
+ }}
+ returnKeyLabel={changePassword ? 'Next' : this.state.title}
+ returnKeyType={changePassword ? 'next' : 'done'}
secureTextEntry
placeholder={changePassword ? 'Current password' : 'Password'}
/>
@@ -636,6 +642,9 @@ export class VaultDialog extends Component {
onChangeText={(value) => {
this.newPassword = value;
}}
+ onSubmit={this.onPress}
+ returnKeyLabel="Change"
+ returnKeyType="done"
secureTextEntry
placeholder={'New password'}
/>
@@ -651,7 +660,12 @@ export class VaultDialog extends Component {
onChangeText={(value) => {
this.password = value;
}}
+ returnKeyLabel="Next"
+ returnKeyType="next"
secureTextEntry
+ onSubmit={() => {
+ confirmPassRef.current?.focus();
+ }}
placeholder="Password"
/>
@@ -665,6 +679,8 @@ export class VaultDialog extends Component {
errorMessage="Passwords do not match."
onErrorCheck={(e) => null}
marginBottom={0}
+ returnKeyLabel="Create"
+ returnKeyType="done"
onChangeText={(value) => {
this.confirmPassword = value;
if (value !== this.password) {
@@ -677,6 +693,7 @@ export class VaultDialog extends Component {
});
}
}}
+ onSubmit={this.onPress}
placeholder="Confirm password"
/>
</View>