Getting "Not Implemented" when trying to Filter Dynamic Dataset in Preview Mode

I’ve got a dynamic Page that I’m trying to filter based on a user interaction. I’ve got all the code working and when I publish it, it seems to work fine. But for some reason using the PREVIEW MODE when I try to set the filter on the dataset I get a “Not Implemented” error in the console and the data disappears.

It’s more complex than a dropdown so I have to write code to do some calculations, therefore cant use the built in “user input” filter in the UI Config

Abbreviated Code below

$w.onReady(function () {

  $w('#bandDataset').onReady(() => {
    geoloc();
  })

});

function geoloc()
{
  // Get some variables from inputs 
  
  $w("#bandDataset").setFilter( wixData.filter()
  .between("lat", latBottom, latTop)
  .between("long", longLeft, longRight)
);
}

I’ve tried other filtered and empty filters as well.

Have you tried awaiting for the filter promise to be resolved?

Try this:

$w.onReady(() => {
  $w('#bandDataset').onReady(async () => {
    await geoloc()
  })
})

async function geoloc() {
  // Get some variables from inputs

  await $w('#bandDataset').setFilter(
    wixData
      .filter()
      .between('lat', latBottom, latTop)
      .between('long', longLeft, longRight)
  )
}