sn-simple-task-editor
Advanced tools
Comparing version 1.0.12 to 1.0.121
@@ -33,3 +33,3 @@ import React, { Component, PropTypes } from 'react'; | ||
onTextChange = ($event) => { | ||
var text = event.target.value; | ||
var text = $event.target.value; | ||
this.props.task.setContentString(text); | ||
@@ -53,2 +53,10 @@ this.props.handleTextChange(this.props.task, text); | ||
onKeyPress = ($event) => { | ||
if($event.key == "Enter") { | ||
// We want to disable any action on enter, since newlines are reserved | ||
// and are how tasks are delimitted. | ||
$event.preventDefault(); | ||
} | ||
} | ||
resizeTextArea(textarea) { | ||
@@ -81,3 +89,5 @@ // set to 1 first to reset scroll height in case it shrunk | ||
onChange={this.onTextChange} | ||
onKeyUp={this.onKeyUp} type="text" | ||
onKeyUp={this.onKeyUp} | ||
onKeyPress={this.onKeyPress} | ||
type="text" | ||
className='task-input-label' | ||
@@ -84,0 +94,0 @@ /> |
import Task from "../models/Task"; | ||
import ComponentManager from 'sn-components-api'; | ||
let TaskDelimitter = "\n\n"; | ||
let TaskDelimitter = "\n"; | ||
@@ -6,0 +6,0 @@ export default class TasksManager { |
@@ -21,3 +21,3 @@ export default class Task { | ||
isEmpty() { | ||
return this.content.replace(/ /g, '').length > 0 | ||
return this.content.replace(/ /g, '').length == 0; | ||
} | ||
@@ -24,0 +24,0 @@ |
{ | ||
"name": "sn-simple-task-editor", | ||
"version": "1.0.12", | ||
"version": "1.0.121", | ||
"main": "dist/dist.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
423358
27
1260
0