Setting newLineOnEnter false by default

This commit is contained in:
Francisco Hodge
2018-04-12 12:25:10 -04:00
parent a097b0f470
commit 988b8a0f64
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -126,10 +126,10 @@ debug={false}
> Specifies whether clicking the "ENTER" button will input a newline (`\n`) or not.
```js
newLineOnEnter={true}
newLineOnEnter={false}
```
## Methods
## MethodsS
simple-keybord has a few methods you can use to further control it's behavior.
To access these functions, you need a `ref` of the simple-keyboard component, like so:
+1
View File
@@ -54,6 +54,7 @@ class App extends Component {
onChange={input => this.onChange(input)}
onKeyPress={button => this.onKeyPress(button)}
layoutName={this.state.layoutName}
newLineOnEnter={true}
layout={{
'default': [
'` 1 2 3 4 5 6 7 8 9 0 - = {bksp}',
+1 -1
View File
@@ -65,7 +65,7 @@ class App extends Component {
* Updating input
*/
let options = {
newLineOnEnter: this.props.newLineOnEnter !== false || true
newLineOnEnter: (this.props.newLineOnEnter === true)
}
let updatedInput = Utilities.getUpdatedInput(button, this.state.input, options);