mirror of
https://github.com/zadam/trilium.git
synced 2025-12-19 22:59:53 +01:00
docs(scripting): remove workaround for sidebar visibility
This commit is contained in:
@@ -20,14 +20,21 @@ class ToDoListWidget extends api.RightPanelWidget {
|
||||
}
|
||||
|
||||
async refreshWithNote(note) {
|
||||
this.toggleInt(false);
|
||||
this.triggerCommand("reEvaluateRightPaneVisibility");
|
||||
this.toggleInt(true);
|
||||
this.triggerCommand("reEvaluateRightPaneVisibility");
|
||||
// Do something when the note changes.
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = new ToDoListWidget();
|
||||
```
|
||||
|
||||
The implementation is in `src/public/app/widgets/right_panel_widget.js`.
|
||||
The implementation is in `src/public/app/widgets/right_panel_widget.js`.
|
||||
|
||||
## Conditionally changing visibility
|
||||
|
||||
In `refreshWithNote`:
|
||||
|
||||
```
|
||||
const visible = true; // replace with your own visibility logic
|
||||
this.toggleInt(visible);
|
||||
this.triggerCommand("reEvaluateRightPaneVisibility");
|
||||
```
|
||||
Reference in New Issue
Block a user