Skip to content

Commit

Permalink
Update right sidebar title when changing mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentfretin committed Jun 12, 2024
1 parent cf7283d commit d4c185b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/editor/components/components/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ export default class Sidebar extends React.Component {
}

componentDidMount() {
Events.on('entityupdate', (detail) => {
if (detail.entity !== this.props.entity) {
return;
}
if (detail.component === 'mixin') {
this.forceUpdate();
}
});

Events.on('componentremove', (event) => {
this.forceUpdate();
});
Expand Down

0 comments on commit d4c185b

Please sign in to comment.