adazzle-react-grid
Advanced tools
Comparing version 0.1.12 to 0.1.13
@@ -87,4 +87,14 @@ /** | ||
getLabel: function (result) { | ||
var label = this.props.label != null ? this.props.label : 'title'; | ||
if (typeof label === "function") { | ||
return label(result); | ||
} else if (typeof label === "string") { | ||
return result[label]; | ||
} | ||
}, | ||
handleChange:function(args){ | ||
this.props.onCommit({value : args.title, key : 'Enter'}); | ||
var label = this.getLabel(args); | ||
this.props.onCommit({value : label, key : 'Enter', result : args}); | ||
}, | ||
@@ -94,4 +104,5 @@ | ||
var val = {title : this.getDefaultValue()}; | ||
var label = this.props.label != null ? this.props.label : 'title'; | ||
return (React.createElement("div", {style: this.getStyle(), onKeyDown: this.onKeyDown}, | ||
React.createElement(ReactAutocomplete, {ref: "autoComplete", options: this.props.options, value: val, onChange: this.handleChange}) | ||
React.createElement(ReactAutocomplete, {search: this.props.search, ref: "autoComplete", label: label, options: this.props.options, value: val, onChange: this.handleChange}) | ||
)); | ||
@@ -98,0 +109,0 @@ } |
@@ -31,3 +31,3 @@ /** | ||
var cellKey = this.getColumns()[selected.idx].key; | ||
this.props.onCellChanged({cellKey: cellKey , rowIdx: selected.rowIdx, value : this.state.textToCopy}); | ||
this.props.onCellCopyPaste({cellKey: cellKey , rowIdx: selected.rowIdx, value : this.state.textToCopy, fromRow : this.state.copied.rowIdx, toRow : selected.rowIdx}); | ||
this.setState({copied : null}); | ||
@@ -34,0 +34,0 @@ } |
{ | ||
"name": "adazzle-react-grid", | ||
"version": "0.1.12", | ||
"version": "0.1.13", | ||
"description": "Data grid for React", | ||
@@ -23,3 +23,4 @@ "main": "lib/index.js", | ||
"immutable": "^3.0.0", | ||
"jquery": "^2.1.1" | ||
"jquery": "^2.1.1", | ||
"ron-react-autocomplete": "1.0.2" | ||
}, | ||
@@ -70,3 +71,2 @@ "devDependencies": { | ||
"rewire-webpack": "^1.0.0", | ||
"ron-react-autocomplete": "0.0.6", | ||
"sinon": "^1.9.1", | ||
@@ -73,0 +73,0 @@ "vinyl-source-stream": "^0.1.1", |
362710
46
5990
6
+ Addedron-react-autocomplete@1.0.2
+ Addedron-react-autocomplete@1.0.2(transitive)