dmn-js-shared
Advanced tools
Comparing version 2.0.0-alpha3 to 2.0.0-alpha4
@@ -136,4 +136,9 @@ import { Component } from 'inferno'; | ||
if (event.which === 13) { | ||
event.preventDefault(); | ||
if (this.props.ctrlForNewline && !isCmd(event)) { | ||
return; | ||
} | ||
insertLineBreak(); | ||
@@ -243,2 +248,6 @@ | ||
); | ||
} | ||
function isCmd(event) { | ||
return event.metaKey || event.ctrlKey; | ||
} |
@@ -167,2 +167,3 @@ import { Component } from 'inferno'; | ||
className={ props.className } | ||
ctrlForNewline={ props.ctrlForNewline } | ||
onFocus={ this.onFocus } | ||
@@ -169,0 +170,0 @@ onBlur={ this.onBlur } |
@@ -42,2 +42,18 @@ import { Component } from 'inferno'; | ||
getRemoveClickHandler = (item) => { | ||
return (e) => { | ||
e.stopPropagation(); | ||
this.removeItem(item); | ||
}; | ||
} | ||
getToggleClickHandler = (item) => { | ||
return (e) => { | ||
e.stopPropagation(); | ||
this.toggleItem(item); | ||
}; | ||
} | ||
removeItem = (item) => { | ||
@@ -122,3 +138,3 @@ const { onChange } = this.props; | ||
className="item-toggle cursor-pointer" | ||
onClick={ () => this.toggleItem(item) } /> | ||
onClick={ this.getToggleClickHandler(item) } /> | ||
} | ||
@@ -131,3 +147,3 @@ | ||
title="Remove item" | ||
onMouseup={ () => this.removeItem(item) } | ||
onClick={ this.getRemoveClickHandler(item) } | ||
className={ REMOVE_BTN_CLS }> | ||
@@ -134,0 +150,0 @@ </span>) |
{ | ||
"name": "dmn-js-shared", | ||
"description": "Shared components used by dmn-js", | ||
"version": "2.0.0-alpha3", | ||
"version": "2.0.0-alpha4", | ||
"scripts": { | ||
@@ -21,3 +21,3 @@ "test": "karma start", | ||
"min-dash": "^1.1.0", | ||
"selection-ranges": "^1.2.2", | ||
"selection-ranges": "^1.2.3", | ||
"selection-update": "^0.1.2" | ||
@@ -24,0 +24,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54964
33
1936
Updatedselection-ranges@^1.2.3