Freeze first row and column in tables

Use case or problem

It’s not easy to read and to complete large tables because the header and first column disappear on scrolling.

Proposed solution

Adding the ability to freeze the first row and column (EDIT: or maybe set it by default for all tables).

(For the columns, there is a css property sticky but can’t manage to make it work with a snippet).

Thank you for taking the time to read me and thank you to make Obsidian so convenient to use !

4 Likes

This may be hard to implement since you don’t want to freeze the first row by default. And what should happen after you revisit the note later, should you see the fixed row or not? In what cases the fixed row state is preserved and where that information should be stored. What happens if there are multiple tables in one note?

Thank you for your message and your thoughts about it. You’re right, if this make it easier, the header could be fixed by default.

About the possiblity for a page to contain several tables, there are a lot of tutos with live demos on sticky property showing it can be possible with just few lines of css with or without javascript.

Like this one : https://codepen.io/jonaspas/pen/QamXaM

I am not enough skilled to implement it, but bases on these examples, it seems apparently not very hard to add this feature.

And it could be I think a very appreciated because currently, I do not see a lot of people using Obsidian for large table except through special plugins.

1 Like

I have the same request, it would make browsing large tables much easier.

1 Like

With the current implementation of Obsidian only parts of larger documents are loaded into memory, which means that the top of a table could very well be unloaded when scrolling in a longer table.

This in turn means, it’s not just as easy as many tutorials say to just add a little CSS to make this happen. Obsidian would either need to counter what one (or both) of the markdown engines currently do, or get the markdown engines to keep entire documents loaded at all times.

I’m not sure if neither feasible, or wanted on a general level. Although, I’ve looked into doing related stuff myself, so I would’ve like the opportunity to do this at some level.

1 Like