-
Notifications
You must be signed in to change notification settings - Fork 814
Closed
Labels
Description
textProps needs to passed through properly.
render() {
const {
children,
theme,
size,
disabled,
placeholder,
isSelectable,
textProps,
...props
} = this.props
const { isEditing, value } = this.state
return (
<React.Fragment>
<TextTableCell
isSelectable={isSelectable && !disabled}
innerRef={this.onMainRef}
onClick={this.handleClick}
onDoubleClick={this.handleDoubleClick}
onKeyDown={this.handleKeyDown}
size={size}
cursor={disabled ? 'not-allowed' : 'default'}
textProps={{
size,
opacity: disabled || (!children && placeholder) ? 0.5 : 1,
...textProps
}}
{...props}
>
{children ? children : placeholder}
</TextTableCell>
{isEditing && (
<Portal>
<Stack>
{zIndex => (
<EditableCellField
zIndex={zIndex}
getTargetRef={() => this.mainRef}
value={value}
onEscape={this.handleFieldEscape}
onBlur={this.handleFieldBlur}
onCancel={this.handleFieldCancel}
size={size}
/>
)}
</Stack>
</Portal>
)}
</React.Fragment>
)
}