I’m having the same issue. Could anyone please help me on this.
ISSUE HERE - This is a dynamic page which is loaded after a button click (so the data is already filtered being a dynamic page). Now that data is already filtered, I want to remove duplicates. The code below is removing duplicates from the database import but I want to remove duplicates from the filtered data in the repeater.
Bold ones are variables - varying as per my collection/usages.
CODE HERE -
import wixData from ‘wix-data’;
export function dataset _ready() {
wixData.query(" databasecollection “).limit(1000).find().then(results => {
$w(” # repeater ").data = Array.from(results.items.reduceRight((m, t) => m.set(t. myfieldkey , t), new Map()).values());
});
}
Please connect on this, Thanks!
Looking something like onreadyitems in the repeater were data is already imported/filtered and now applying wix code for removing duplicates.