mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-02-24 17:23:07 +01:00
Add 3 lifecycle event handlers (#2833)
This commit is contained in:
parent
80212943cc
commit
2ec21e7fc4
@ -158,6 +158,8 @@ class Content extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.updateSelection()
|
this.updateSelection()
|
||||||
|
|
||||||
|
this.props.onEvent('onComponentDidMount', { target: this.ref.current })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -180,6 +182,8 @@ class Content extends React.Component {
|
|||||||
this.handlers.onBeforeInput
|
this.handlers.onBeforeInput
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.props.onEvent('onComponentWillUnmount', { target: this.ref.current })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -188,7 +192,10 @@ class Content extends React.Component {
|
|||||||
|
|
||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
debug.update('componentDidUpdate')
|
debug.update('componentDidUpdate')
|
||||||
|
|
||||||
this.updateSelection()
|
this.updateSelection()
|
||||||
|
|
||||||
|
this.props.onEvent('onComponentDidUpdate', { target: this.ref.current })
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user