Hi,
there are no changes on how the filters should behave, our guess is any script is now in conflict with any other of your site and it's not launching the filter function anymore. Can you please share (in private data) the url of your site so we can debug and confirm?
Thanks, best regards
Silvia Martín
Moonsoft Team
See private data as requested.
We have also noticed further strange behaviour on checkboxes.
1/ we have a test table that has a numeric field that holds the numbers 0, 1 or 2. When a checkbox is set up for this, it only displays 1 and 2 as options even though some entries have the value 0 (See image)
2/ another table has a range of text values including one that is blank. The checkbox no longer contains the option for blanks.
From these it seems to be ignoring the 'null' or '0' cases for the filters?
Hi,
we've checked the filters and in fact they are launched all together,so it takes into account the global search filter and the rest of the column filters. We're going to include for the next version some additional parameters in order to configure the filters with some more detail to be able to cover all use cases. In the meantime, you can set as you suggested the checkboxes as 'selected', so they will be handled as 'all'. Just paste this code into the js section of your list:
var filtername = 'Media Type'; //here your filter name
var toinitload=true;
var _lmcallback =
<>>
>
Thanks very much for your support. I couldn't get the code fragment you provided to work (I think because it uses jQuery) but it did give me a clue to how to access the DOM model once the module is loaded (viz the subscriber to endLoadData).
It's fine for us that all checkboxes are set on load so this works for us:
function selectAll() {
var checkboxes = document.querySelectorAll('input');
for (var i = 0; i < checkboxes.length; i++) {
if (checkboxes.type == 'checkbox')
checkboxes.checked = true;
}
}
var toinitload=true;
var _lmcallback =
Hi,
ok, thanks for the feedback. We tried the code we sent you at your page on the console, but maybe as you say it could be related to the jQuery library, the code you're using is perfect.
We're going to launch further tests from our side and try to reproduce, can you please confirm if you see the data directly at the database (with phpmyadmin) you also see the 0's, or maybe any other null or empty value?
Thank you very much for all the information, best regards
Silvia Martín
Moonsoft Team
Thanks Silvia. I can confirm there are only 0, 1 and 2 values in the table. I've enclosed a select distinct to show you the value. I did notice this article: https://stackoverflow.com/questions/56813150/querying-a-string-in-a-int-field-returns-all-rows-containing-0-in-that-field
this might explain why a text search for a string in an int field returns the 0 values (the text to int conversion fails and returns 0 which is then matched).
I am wondering if this might have something to do with the 0's not appearing as one of the checkbox options?
I think something has changed in one of the more recent releases of List Manager. We have a checkbox search filter on a list and when the pages load, the checkboxes are not checked. Previously this was fine and they were only applied on change when they were selected. Now however, they need to be selected otherwise no data is returned. Has something changed? The option 'Apply on Change' seems to make no difference.
One alternative is to set all the checkboxes to checked when the page loads but I can't determine the correct Javascript to run to make that happen.
We recently upgraded to version 5.6.5 from an older version and the behaviour seems to have changed after that.