Is your feature request related to a problem? Please describe.
There is a toggleComments method but no corresponding onToggleComments event.
This means that although the state may be toggled from outside of the editor, the editor may toggle the state without reporting back.
The "assumed" state will become out-of-sync with the real state within the editor.
Describe the solution you'd like
The existing toggleComments() method can be improved by accepting an optional boolean argument, indicating whether the structure should be enabled/disabled/toggled.
toggleComments: (enabled?: boolean) => void;
A corresponding onToggleComments callback that may be provided, to be called whenever the state actually changes (whether externally via the method, or internally via Bee's UI), providing the current state as an argument.
onToggleComments?: (enabled: boolean) => void;
This would be similar to the existing onTogglePreview method.
Is your feature request related to a problem? Please describe.
There is a
toggleComments
method but no correspondingonToggleComments
event.This means that although the state may be toggled from outside of the editor, the editor may toggle the state without reporting back.
The "assumed" state will become out-of-sync with the real state within the editor.
Describe the solution you'd like
The existing
toggleComments()
method can be improved by accepting an optional boolean argument, indicating whether the structure should be enabled/disabled/toggled.A corresponding
onToggleComments
callback that may be provided, to be called whenever the state actually changes (whether externally via the method, or internally via Bee's UI), providing the current state as an argument.This would be similar to the existing
onTogglePreview
method.