Hi there,
I have encountered this issue a few days ago and for the life of me I cannot figure out what is wrong
Here is what happens in pictures:
![](https://static.wixstatic.com/media/a27d24_f7223db7c72c4217834f978298b3e1ac~mv2.png/v1/fill/w_50,h_30,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/a27d24_f7223db7c72c4217834f978298b3e1ac~mv2.png)
then:
![](https://static.wixstatic.com/media/a27d24_636bd227a0074458a565c83d5a06ac64~mv2.png/v1/fill/w_101,h_54,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/a27d24_636bd227a0074458a565c83d5a06ac64~mv2.png)
finally:
![](https://static.wixstatic.com/media/a27d24_ba906d44797348bf82c1675b212196c2~mv2.png/v1/fill/w_111,h_55,al_c,q_85,usm_0.66_1.00_0.01,blur_2,enc_auto/a27d24_ba906d44797348bf82c1675b212196c2~mv2.png)
I have a repeater that is populated by code, it does display correctly. After a bit of time (less than 2 seconds) it just starts disappearing (first the profile picture then the name). I am further confused by the fact that if I click on it before anything disappears, I correctly retrieve the ID of the user affiliated to the element, however when I click on it after it has disappeared, the ID appears to have an extra "_p_1" at the end ("8fa24dea-4723-4c0c-bc53-3eb7c685036d" becomes "8fa24dea-4723-4c0c-bc53-3eb7c685036d_p_1")
The repeater works perfectly well when I use this function (it does not disappear, ID works well):
function setSidePanel(userId, j) {
let container, img, name;
if (j == 0) {
container = "#repeaterInUser";
img = "#imageIn";
name = "#textNameIn";
dataset = "Members";
} else if (j == 1) {
container = "#repeaterSciUser";
img = "#imageSci";
name = "#textNameSci";
dataset = "InfluencerMembers";
}
wixData.query(dataset)
.eq("_id", userId)
.find()
.then(async (results) => {
let currentUser = [];
for (let i = 0; i < results.items[0].interactions.length; i++) {
let x = results.items[0].interactions[i];
let y = [{ '_id': x }];
currentUser = currentUser.concat(y);
}
$w(container).onItemReady(async ($w, itemData, index) => {
$w(img).src = (await getProfile(itemData._id, 1, 1, dataset));
$w(name).text = (await getProfile(itemData._id, 0, 1, dataset));
});
$w(container).data = currentUser;
});
however this function causes it to disappear:
function setSidePanelFilter(filter) {
let container, img, name, j;
j = parseInt(memory.getItem("j"));
if (j == 0) {
container = "#repeaterInUser";
img = "#imageIn";
name = "#textNameIn";
dataset = "InfluencerMembers";
} else if (j === 1) {
container = "#repeaterSciUser";
img = "#imageSci";
name = "#textNameSci";
dataset = "Members";
}
wixData.query(dataset)
.contains("fullName", filter)
.find()
.then(async (results) => {
if (results.items.length > 0) {
let currentUser = [];
for (let i = 0; i < results.length; i++) {
let x = results.items[i]._id;
let y = [{ '_id': x }];
currentUser = currentUser.concat(y);
}
$w(container).onItemReady(async ($w, itemData, index) => {
$w(img).src = (await getProfile(itemData._id, 1, 1, dataset));
$w(name).text = (await getProfile(itemData._id, 0, 1, dataset));
});
$w(container).data = currentUser;
} else {
console.log("query empty")
}
});
}
Please let me know if I can provide any additional information
Just as an aside, you are using incorrect terminology. The variable dataset is actually being set to a database collection and not a dataset. A dataset is a thing (not really a page element, but sort of) that connects page elements to data in a database collection.
You should add a console.log() statement to see if you have any results from your query. Seems as if the filter code does not return any results, and then the Repeater is refreshed with no data and ends up with nothing to display.
Your catching it before anything disappears just means that the Repeater is in the process of being refreshed, and that that item hasn't yet been refreshed out of existence.