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 11/* eslint max-len: 0 */
2+ /* eslint no-console: 0 */
23import React from 'react' ;
34import { BootstrapTable , TableHeaderColumn } from 'react-bootstrap-table' ;
45
@@ -66,10 +67,17 @@ export default class EditTypeTable extends React.Component {
6667 }
6768
6869 render ( ) {
70+ // custom attributes on editor
71+ const attrs = {
72+ rows : 10 ,
73+ onKeyDown : function ( ) {
74+ console . log ( 'keydown event trigger' ) ;
75+ }
76+ } ;
6977 return (
7078 < BootstrapTable data = { jobs } cellEdit = { cellEditProp } >
7179 < 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 >
7381 < TableHeaderColumn dataField = 'type1' dataFormat = { this . formatType } editable = { { type : 'select' , options : { values : jobTypes } } } > Job Type1</ TableHeaderColumn >
7482 < TableHeaderColumn dataField = 'type2' editable = { { type : 'select' , options : { values : this . jobTypes } } } > Job Type2</ TableHeaderColumn >
7583 < TableHeaderColumn dataField = 'active' editable = { { type : 'checkbox' , options : { values : 'Y:N' } } } > Active</ TableHeaderColumn >
You can’t perform that action at this time.
0 commit comments