Collapse empty elements in a repeater?

I’m having an issue with a repeater at the moment, don’t know if it’s related.

I’m filtering with wix code but it’s not including all the fields in the filter (just a single filter on a boolean value in a dataset)

I think it has to do with the fact that the filter is happening “onReady”"

$w.onReady( function () {

let query = wixLocation.query;

if (query[‘product’] === ‘change’) {
$w(“#dataset1”).setFilter(wixData.filter()
.eq(“boolean”, true )
);

It works when the following query criteria is not true and i invoke it with similar code initiated by a button click event.

Any thoughts?