File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,11 +78,11 @@ class ObjectCell extends React.Component {
7878 handleDoubleClick = ( event ) => {
7979 this . beginEdit ( )
8080 }
81- editable ( objectId ) {
82- return cellIsEditable ( objectId , this . props . column )
81+ editable ( object ) {
82+ return cellIsEditable ( object , this . props . column )
8383 }
8484 beginEdit = ( editReplaceOverride ) => {
85- if ( ! this . props . disabled && this . editable ( this . getCellRef ( ) . objectId ) ) {
85+ if ( ! this . props . disabled && this . editable ( this . props . object ) ) {
8686 this . props . beginEdit ( this . getCellRef ( ) , editReplaceOverride )
8787 }
8888 }
@@ -137,7 +137,7 @@ class ObjectCell extends React.Component {
137137
138138 let cellProps = {
139139 className : classNames ( classes + ' drawer ' + drawer . className , {
140- uneditable : ( ! this . editable ( this . getCellRef ( ) . objectId ) ) ,
140+ uneditable : ( ! this . editable ( this . props . object ) ) ,
141141 } ) ,
142142 }
143143 if ( ! this . props . column . disableInteraction ) {
Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ function dictFirstKey(dict) {
1313 return undefined
1414}
1515
16- function cellIsEditable ( objectId , column ) {
16+ function cellIsEditable ( object , column ) {
1717 const { isReadOnly, editor } = column
1818 const editorIsSet = editor !== false
19- const readOnly = typeof isReadOnly === 'function' ? isReadOnly ( objectId ) : ( isReadOnly === true )
19+ const readOnly = typeof isReadOnly === 'function' ? isReadOnly ( object ) : ( isReadOnly === true )
2020 return editorIsSet && ! readOnly
2121}
2222
You can’t perform that action at this time.
0 commit comments