Re: [tw5] Presenting: list-table-draggable - drag'n drop rows of data

This Draggable Table deal is SWEET! I started incorporating it into all sorts of places in my Tiddlywiki.

One issue though, it doesn’t seem to “update” correctly. I’m using it for a task list, and when I check a task off as “done” (tagged with “Done”) the table row should no longer appear in the table because it does not match the filter any longer. That only works so long as I have never “dragged” the line item.

Once I drag the table row to a new spot in the table, the filter that populates the table doesn’t seem to apply any more, and my table row (that should disappear) remains in the table.
Maybe I’m missing something?

Hope you keep working on this fantastic plugin, and thank you for making it!

Hi Brian and good to hear you like it.

First off, let me recommend that you join the main group for TW at https://talk.tiddlywiki.org/ - I saw this post there because all posts here on gg get reposted there, but not vice versa. It is the new official main forum for TW.

With that said; You’re right in your observation. I believe it should be solvable but it is a bit complex so I’ll need to return to think about how to solve it, earliest in the weekend (but I can’t make any promise). Here’s the difficulty:

As you know, the displayed rows in the table are based on the output from your custom filter, which is stored in the list-filter field. Each title creates a table row but because you can reorder the table rows, the order is arbitrary and thus has to be statically stored, which is done in the list field.

But it is of course important that if a new tiddler qualifies in the filter, it should also show up in the resulting table. So the table rows are generated from BOTH the static list and the list-filter. This means that when you uncheck “done” in your tiddler then it no longer qualifies in the list-filter… but the title is still in the static list field! Again, this field has to be static to keep track of your arbitrary sort order.

What I should probably do is to add an action when an item is drag’n dropped to weed out all titles in the list field that don’t qualify in the list-filter. There’s just a nagging feeling that I’ve pondered over this and decided against it, but I’m not sure and I can’t remember why I’d do that. (I.e why would I want items that don’t qualify in the filter?)

Incidentally, as I’ve now quickly reviewed the code (and realized it is pretty complex) I note that I’ve also put in a qualified that each filter output has to be an existing tiddler. I wonder if this is a wise requirement. But it does mean that if you delete your done actions, they will disappear from the table. Not sure you’d want that but just sayin’.

Anyway, I’ll have to get back to this, hopefully this weekend but no promise.

And do consider switching over to - or at least joining - the https://talk.tiddlywiki.org/ forum.

<:-)