I have a repeater that when I apply a filter, it show's gaps in the results. It is almost like that's where the filtered rows would normally go. The filter is being set in on the dataset in the page. Please advise.
![](https://static.wixstatic.com/media/a27d24_d58e18c3fbbe471f8d605b91f1aee4fa~mv2_d_1920_1494_s_2.png/v1/fill/w_49,h_38,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/a27d24_d58e18c3fbbe471f8d605b91f1aee4fa~mv2_d_1920_1494_s_2.png)
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
I did not use the onItemReady() function. What's weird is that I am no longer seeing the gaps in the repeater. If it happens again, I will try using the onItemReady() function and see if that resolves the issue. I appreciate your time in this matter.
Hi Aaron,
I suspect that there is a problem with the timing for the forEachItem loop through the repeater items. What does your repeater onItemReady() function look like?
I would suggest trying without the forEachItem loop to see what the results look like. This will help isolate the problem.
If you continue to have problems, you can post the URL of your site so I can inspect. Only authorized Wix personnel can get access to your site in the editor.
I apologize for the delayed response. Please find my code below. I am simply adding the filter and sort to the dataset and then doing some basic data formatting.
import wixData from "wix-data";
$w.onReady(function () {
$w("#dataset1").onReady( () => {
//$w("#dataset1").setFilter(wixData.filter().eq("approved", true));
$w("#dataset1").setSort( wixData.sort()
.descending("datePosted")
);
$w("#repeater1").forEachItem( ($w) => {
const originalDate = $w("#text20").text;
const newDate = originalDate.split(' ').splice(0, 4).join(' ');
$w('#text20').text = newDate;
console.log('Time removed from Date/Time Stamp: New Date ' + newDate);
let text = $w("#text14");
text.html = text.html.replace(/<span/g, '<span style="font-family:helvetica;font-size:11pt;color:#959595;"');
text.html = text.html.replace(/<p/g, '<p style="font-family:helvetica;font-size:11pt;color:#959595;line-height:1.6"');
$w("#text14").html= text.html;
//console.log(text.html);
});
});
});
Hey Aaron,
Welcome to the Wix Code forums.
Could you post your code here so we can inspect. It seems as if you are creating "blank" repeater items, instead of skipping an item altogether.
Yisrael