Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

'clear_filters' does not work.

42 views
Skip to first unread message

Johnny Pedersen

unread,
Apr 26, 2024, 7:09:16 AM4/26/24
to Jam.py Users Mailing List
I'm trying to use 'clear_filters' but cannot make it work.

image.png

What could be the issue?

I also want to place a button - 'Clear filters' to the right of the 'Filters' button.

Danijel Kaurin

unread,
Apr 27, 2024, 12:42:05 PM4/27/24
to Johnny Pedersen, Jam.py Users Mailing List
Hi Johnny.

Did you tried: 
item.clear_filters();
item.refresh_page();

Regards

Danijel

--
You received this message because you are subscribed to the Google Groups "Jam.py Users Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jam-py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jam-py/CADj02sVjFuaLBK8Jb5NM_0F9gfa4f54edifbRVny7Jm__5N%3D%3Dg%40mail.gmail.com.

Johnny Pedersen

unread,
Apr 29, 2024, 11:48:55 AM4/29/24
to Danijel Kaurin, Jam.py Users Mailing List
Hi,

Thanks, it works fine by clearing the filters defined in "Filters".  It would be nice if the other part of the column filter also could be cleared at the same time.
image.png

Is it possible to do? 

Dean D. Babic

unread,
Apr 29, 2024, 10:16:23 PM4/29/24
to Jam.py Users Mailing List
That is search, not a filter.

(*) To be fair, it is quite annoying how Search works at the moment, since changing 
a dropdown for a search column will clear the search string :(
At the moment of writing in the search field, the user might decide to search some other column.
Or some other. Or other...

What I liked in Jam v4 was the ability to search columns by merely clicking on any column.
Search even had a badge sign (?) with this tip:
'To select a search field hold Ctrl key and click on the corresponding column of the table.'
This was way faster than navigating through the dropdown list. No idea why was this approach dumped.

So what to do for (*)? 

First, fork Jam. Why? Because this will not go into the main branch before acceptance.
Find  jam.js line 921 and comment  out this on your branch:
                        search.focus();
                        search.val('');
Same in jam.min.js, find, comment out.
Hence, the (*) is now fixed and you can write a solution for clearing the search field, 
and contribute to the project in a similar way.

Cheers
D.
Reply all
Reply to author
Forward
0 new messages