Make ItemView pinnable

Use case or problem

Right now if you create a view that extends the ItemView class, the leaf is not pinnable in the navigation bar. However, if you extend the FileView class, the leaf is pinnable.


Proposed solution

Make the ItemView class pinnable like the FileView class. I don’t see a reason why an ItemView shouldn’t be pinnable.

Current workaround (optional)

None

Related feature requests (optional)

Any WorkspaceLeaf can be pinned. The menu item only appears if the corresponding view can “navigate”: obsidian-api/obsidian.d.ts at e523ed9c94480c8b5129d607b8ad5e4456cfcd3a · obsidianmd/obsidian-api · GitHub

If your view cannot navigate, leaf.pinned does not do anything.

Thank you for the quick response! Setting that flag to true works.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.