Sortable table columns

Apologies if this is a duplicate, but it would be wonderful to be able to sort tables by column data by clicking the column name in the header. Our use case is that we document a number of our database tables in Joplin and this would help us find specific fields.


I second this idea. The benefits would be immense; loads of time saved. Without this feature, sorting tables requires a lot of copy and paste.

If there’s a markdown-it plugin that does that, please let us know. AFAIK this is not a markdown specification thus we won’t implement this ourselves.

Hm, seems like it would be more of a display functionality that
something implemented in the markdown.

Hmm, ok, what happens if you have more than 1 table in the rendering pane? How would the javascript apply the sorting to all tables? But I’m not a js person, so maybe someone finds a way to make it work. But don’t forget that js also has to be injected to the webview in react native.
On the other side I don’t know, if Laurent would accept a PR for that.

This might have promise. I searched “react native sort tables
javascript” and got detailed hits, so it does seem to be something that
people are doing.

It’s been discussed before and the best would be to integrate an existing JS lib that enhances HTML tables with sorting, searching, etc. It’s not related to Markdown because it would be done once the HTML has been rendered. Maybe we should create an issue for this as it’s quite easy to add and could benefit users.

1 Like

The only two UI issues I can think of are

  1. If a user sorts the change in View layout, will they expect the
    change to be saved?
  2. Is there a Markdown to suppress the usage/inclusion of the sort
    feature (e.g. “the order metadata in this table is important and I do
    not want it to be modified outside of an edit”)