mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-22 22:30:52 +01:00
Fix sticky canModify
This commit is contained in:
parent
ae94b76291
commit
1bbf0d8c6e
@ -44,7 +44,7 @@ export const FurnitureStickieView: FC<{}> = props =>
|
|||||||
<div className="d-flex align-items-center nitro-stickie-image stickie-close header-close" onClick={ onClose }></div>
|
<div className="d-flex align-items-center nitro-stickie-image stickie-close header-close" onClick={ onClose }></div>
|
||||||
</div>
|
</div>
|
||||||
<div className="stickie-context">
|
<div className="stickie-context">
|
||||||
{ !isEditing ? <div className="context-text" onClick={ event => setIsEditing(true) }>{ text }</div> : <textarea className="context-text" defaultValue={ text } tabIndex={ 0 } onBlur={ event => updateText(event.target.value) } autoFocus></textarea> }
|
{ (!isEditing || !canModify) ? <div className="context-text" onClick={ event => (canModify && setIsEditing(true)) }>{ text }</div> : <textarea className="context-text" defaultValue={ text } tabIndex={ 0 } onBlur={ event => updateText(event.target.value) } autoFocus></textarea> }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</DraggableWindow>
|
</DraggableWindow>
|
||||||
|
Loading…
Reference in New Issue
Block a user