mirror of
https://github.com/wassname/talk.git
synced 2026-07-24 13:20:47 +08:00
Support nested feature instance
This commit is contained in:
@@ -78,7 +78,12 @@ class RTE extends React.Component {
|
||||
handleRef = ref => (this.ref = ref);
|
||||
|
||||
forEachFeature(callback) {
|
||||
Object.keys(this.featuresRef).map(k => callback(this.featuresRef[k]));
|
||||
Object.keys(this.featuresRef).map(k => {
|
||||
const instance = this.featureRef[k].getFeatureInstance
|
||||
? this.featureRef[k].getFeatureInstance()
|
||||
: this.featureRef[k];
|
||||
callback(instance);
|
||||
});
|
||||
}
|
||||
|
||||
componentWillReceiveProps(props) {
|
||||
|
||||
Reference in New Issue
Block a user