Skip to content

Commit 5c7edc2

Browse files
author
jspaine
committed
allow setting attrs on editable cells
1 parent 3017388 commit 5c7edc2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/TableEditColumn.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ class TableEditColumn extends Component {
169169
row
170170
} = this.props;
171171
const { shakeEditor } = this.state;
172-
const attr = {
172+
let attr = {
173173
ref: 'inputRef',
174174
onKeyDown: this.handleKeyPress,
175175
onBlur: this.handleBlur
@@ -179,6 +179,7 @@ class TableEditColumn extends Component {
179179
let { className } = this.state;
180180
// put placeholder if exist
181181
editable.placeholder && (attr.placeholder = editable.placeholder);
182+
editable.attrs && (attr = {...editable.attrs, ...attr});
182183

183184
const editorClass = classSet({ 'animated': shakeEditor, 'shake': shakeEditor });
184185
fieldValue = fieldValue === 0 ? '0' : fieldValue;

0 commit comments

Comments
 (0)