Hi guys,
I have an issue with setting a filter to a dataset - code that was originally working, stopped working without any change. I am applying a filter to a dataset, and in the then() function, showing or hiding certain fields based on the filter outcome.
Since two days ago, the setFilter() function stopped working - neither the code in then() function executes, nor the code in the catch() portion. Is anyone aware in any change of the setFilter() behavior?
This is the code in question:
let prdFilter = wixData.filter().eq('productKey', prdId).eq('language', lng);
$w('#dsProducts').setFilter(prdFilter).then( () => {
// This part does not execute
$w('#bxProductDetails').show();
}).catch((error)=>{
// Neither does this part
console.log(error)
});
Note that the dataset contains the records being filtered (when I tried to query the dataset using wixData.query(), it returned the items). However the setFilter() promise does not enter either in the then() function, nor in the catch() function. Collection field names, element names etc. are correct. There are no errors in the console. I tried debugging the JS on both Chrome and Firefox with breakpoints in the show() and log() lines, and the execution does not stop.
What am I doing wrong? This code used to work earlier!
Thanks in advance!
Nikola