File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
/* eslint max-len: 0 */
2
+ /* eslint no-console: 0 */
2
3
import React from 'react' ;
3
4
import { BootstrapTable , TableHeaderColumn } from 'react-bootstrap-table' ;
4
5
@@ -66,10 +67,17 @@ export default class EditTypeTable extends React.Component {
66
67
}
67
68
68
69
render ( ) {
70
+ // custom attributes on editor
71
+ const attrs = {
72
+ rows : 10 ,
73
+ onKeyDown : function ( ) {
74
+ console . log ( 'keydown event trigger' ) ;
75
+ }
76
+ } ;
69
77
return (
70
78
< BootstrapTable data = { jobs } cellEdit = { cellEditProp } >
71
79
< TableHeaderColumn dataField = 'id' isKey = { true } > Job ID</ TableHeaderColumn >
72
- < TableHeaderColumn dataField = 'name' editable = { { type : 'textarea' } } > Job Name</ TableHeaderColumn >
80
+ < TableHeaderColumn dataField = 'name' editable = { { type : 'textarea' , attrs : attrs } } > Job Name</ TableHeaderColumn >
73
81
< TableHeaderColumn dataField = 'type1' dataFormat = { this . formatType } editable = { { type : 'select' , options : { values : jobTypes } } } > Job Type1</ TableHeaderColumn >
74
82
< TableHeaderColumn dataField = 'type2' editable = { { type : 'select' , options : { values : this . jobTypes } } } > Job Type2</ TableHeaderColumn >
75
83
< TableHeaderColumn dataField = 'active' editable = { { type : 'checkbox' , options : { values : 'Y:N' } } } > Active</ TableHeaderColumn >
You can’t perform that action at this time.
0 commit comments