@scriptollc/enum-cell-editor
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -20,2 +20,11 @@ "use strict"; | ||
}; | ||
this.onBlur = (evt) => { | ||
let value = evt.currentTarget.value; | ||
if (this.state.selectedIndex > -1) { | ||
value = this.props.options[this.state.selectedIndex]; | ||
} | ||
const state = Object.assign({ value }, this.state); | ||
this.props.onConfirm(value); | ||
this.setState(state); | ||
}; | ||
this.displayOptions = () => { | ||
@@ -54,4 +63,4 @@ const ulStyle = { | ||
return React.createElement("li", {key: idx, style: { backgroundColor: getRowStyle(idx) }}, | ||
React.createElement("span", {style: spanStyle}, opt) | ||
); | ||
"it'll filter the list by what you've", | ||
React.createElement("span", {style: spanStyle}, opt)); | ||
})) | ||
@@ -127,3 +136,3 @@ ); | ||
return React.createElement("div", {className: classNames(className, core_1.Classes.intentClass(intent), 'bp-table-cell'), style: style, title: tooltip, onKeyDown: this.handleCursor}, | ||
React.createElement("input", {type: 'text', className: 'pt-input', value: this.state.value, onChange: this.toggleOptions}), | ||
React.createElement("input", {type: 'text', className: 'pt-input', value: this.state.value, onBlur: this.onBlur, onChange: this.toggleOptions}), | ||
this.state.showOptions ? this.displayOptions() : ''); | ||
@@ -130,0 +139,0 @@ } |
{ | ||
"name": "@scriptollc/enum-cell-editor", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "An enum select editor for blueprintjs/table", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
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
11750
319
0