feat(removeButton) : add remove button from toolbar option (#4408)
This commit is contained in:
1 parent
e254e7bb3d
commit
e8f9345b93
2 files changed
+13
No files matched your search
@@ -112,6 +112,17 @@ export default class ToolbarService extends PubSubService {
|
||||
unsubscriptions.forEach(unsub => this._serviceSubscriptions.push(unsub));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes buttons from the toolbar.
|
||||
* @param buttonId - The button to be removed.
|
||||
*/
|
||||
public removeButton(buttonId : string ){
|
||||
if(this.state.buttons[buttonId]) delete this.state.buttons[buttonId]
|
||||
this._broadcastEvent(this.EVENTS.TOOL_BAR_MODIFIED, {
|
||||
...this.state,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds buttons to the toolbar.
|
||||
* @param buttons - The buttons to be added.
|
||||
|
||||
Reference in new issue
Block a user