mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-10 09:13:59 +02:00
change placeholder to only render when visible
This commit is contained in:
@@ -66,6 +66,8 @@ class Placeholder extends React.Component {
|
||||
|
||||
render = () => {
|
||||
const isVisible = this.isVisible()
|
||||
if (!isVisible) return null
|
||||
|
||||
const { children, className } = this.props
|
||||
let { style } = this.props
|
||||
|
||||
@@ -76,7 +78,6 @@ class Placeholder extends React.Component {
|
||||
}
|
||||
|
||||
const styles = {
|
||||
display: isVisible ? 'block' : 'none',
|
||||
position: 'absolute',
|
||||
top: '0px',
|
||||
right: '0px',
|
||||
|
Reference in New Issue
Block a user