@@ -14,7 +14,6 @@ import Pill from 'components/Pill/Pill.react';
14
14
import React , { Component } from 'react' ;
15
15
import styles from 'components/BrowserCell/BrowserCell.scss' ;
16
16
import baseStyles from 'stylesheets/base.scss' ;
17
- import Tooltip from '../Tooltip/PopperTooltip.react' ;
18
17
import * as ColumnPreferences from 'lib/ColumnPreferences' ;
19
18
20
19
export default class BrowserCell extends Component {
@@ -388,8 +387,7 @@ export default class BrowserCell extends Component {
388
387
//#endregion
389
388
390
389
render ( ) {
391
- let { type, value, hidden, width, current, onSelect, onEditChange, setCopyableValue, onPointerCmdClick, row, col, field, onEditSelectedRow, readonly, isRequired, markRequiredFieldRow } = this . props ;
392
- let isNewRow = row < 0 ;
390
+ let { type, value, hidden, width, current, onSelect, onEditChange, setCopyableValue, onPointerCmdClick, row, col, field, onEditSelectedRow, isRequired, markRequiredFieldRow } = this . props ;
393
391
394
392
let classes = [ ...this . state . classes ] ;
395
393
@@ -400,68 +398,37 @@ export default class BrowserCell extends Component {
400
398
classes . push ( styles . required ) ;
401
399
}
402
400
403
- return readonly ? (
404
- < Tooltip placement = 'bottom' tooltip = 'Read only (CTRL+C to copy)' visible = { this . state . showTooltip } >
405
- < span
406
- ref = { this . cellRef }
407
- className = { classes . join ( ' ' ) }
408
- style = { { width } }
409
- onClick = { ( e ) => {
410
- if ( e . metaKey === true && type === 'Pointer' ) {
411
- onPointerCmdClick ( value ) ;
412
- } else {
413
- onSelect ( { row, col } ) ;
414
- setCopyableValue ( hidden ? undefined : this . copyableValue ) ;
415
- }
416
- } }
417
- onDoubleClick = { ( ) => {
418
- if ( field === 'objectId' && onEditSelectedRow ) {
419
- onEditSelectedRow ( true , value ) ;
420
- } else {
421
- this . setState ( { showTooltip : true } ) ;
422
- setTimeout ( ( ) => {
423
- this . setState ( { showTooltip : false } ) ;
424
- } , 2000 ) ;
425
- }
426
- } }
427
- onContextMenu = { this . onContextMenu }
428
- >
429
- { row < 0 || isNewRow ? '(auto)' : this . state . content }
430
- </ span >
431
- </ Tooltip >
432
- ) : (
433
- < span
434
- ref = { this . cellRef }
435
- className = { classes . join ( ' ' ) }
436
- style = { { width } }
437
- onClick = { ( e ) => {
438
- if ( e . metaKey === true && type === 'Pointer' ) {
439
- onPointerCmdClick ( value ) ;
440
- }
441
- else {
442
- onSelect ( { row, col } ) ;
443
- setCopyableValue ( hidden ? undefined : this . copyableValue ) ;
444
- }
445
- } }
446
- onDoubleClick = { ( ) => {
447
- // Since objectId can't be edited, double click event opens edit row dialog
448
- if ( field === 'objectId' && onEditSelectedRow ) {
449
- onEditSelectedRow ( true , value ) ;
450
- } else if ( type !== 'Relation' ) {
451
- onEditChange ( true )
401
+ return < span
402
+ ref = { this . cellRef }
403
+ className = { classes . join ( ' ' ) }
404
+ style = { { width } }
405
+ onClick = { ( e ) => {
406
+ if ( e . metaKey === true && type === 'Pointer' ) {
407
+ onPointerCmdClick ( value ) ;
408
+ }
409
+ else {
410
+ onSelect ( { row, col } ) ;
411
+ setCopyableValue ( hidden ? undefined : this . copyableValue ) ;
412
+ }
413
+ } }
414
+ onDoubleClick = { ( ) => {
415
+ // Since objectId can't be edited, double click event opens edit row dialog
416
+ if ( field === 'objectId' && onEditSelectedRow ) {
417
+ onEditSelectedRow ( true , value ) ;
418
+ } else if ( type !== 'Relation' ) {
419
+ onEditChange ( true )
420
+ }
421
+ } }
422
+ onTouchEnd = { e => {
423
+ if ( current && type !== 'Relation' ) {
424
+ // The touch event may trigger an unwanted change in the column value
425
+ if ( [ 'ACL' , 'Boolean' , 'File' ] . includes ( type ) ) {
426
+ e . preventDefault ( ) ;
452
427
}
453
- } }
454
- onTouchEnd = { e => {
455
- if ( current && type !== 'Relation' ) {
456
- // The touch event may trigger an unwanted change in the column value
457
- if ( [ 'ACL' , 'Boolean' , 'File' ] . includes ( type ) ) {
458
- e . preventDefault ( ) ;
459
- }
460
- } } }
461
- onContextMenu = { this . onContextMenu . bind ( this ) }
462
- >
463
- { this . state . content }
464
- </ span >
465
- ) ;
428
+ } } }
429
+ onContextMenu = { this . onContextMenu . bind ( this ) }
430
+ >
431
+ { this . state . content }
432
+ </ span >
466
433
}
467
434
}
0 commit comments