.loadPage() getting floats despite passing whole numbers as its parameters: "currentPage method cannot be set to the value 1.75"

@yisrael-wix So I found out the initial issue was fixed with an ‘await’ during the filtering of the dataset. Although it doesn’t explain the floating error, it was basically unable to load the page because it wasn’t done filtering so the dataset was I guess empty?

Related Issue
However, I noticed a different issue related to the current objective (switching from a lazy scrolling to pagination). The pagination element essentially disappears with an error regarding ‘getBoundingClientRect’ under certain circumstances (outlined at below). I don’t have any code that collapses or hides the pagination element, which is the weird part. So I went back and changed the orderBy and filterTree methods to the one’s described in the API, but the issue still remains.

https://briapril30.wixsite.com/website-3/shop?p=5
Steps to Reproduce:

  1. Go to any page greater than 1 (can just click the link)

  2. Filter dataset (pagination still present)

  3. Deselect filter (pagination disappears and throws error)

I have tried both with the pagination linked to the dataSet as well as unlinked and both have the same issue. With it unlinked, it seems the error gets thrown sometime around when it changes $w(‘#pagination’).totalPages. If you skip assigning a new value to totalPages it does not throw an error at all and it doesn’t disappear, however not assigning a new totalPages is not practical.

Additional Question Regarding Public Files
Could you explain what you mean by those elements “are not accessible from a public file”? For example when I call a function that calls $w(’ #loadingAnimation ').expand() from those public files it expands. I don’t get how they “are not accessible” from those public files when it interacts with those elements just as it should. Another example, like I said before, I have a public file just for loading the filter options into the filter menu on the left and the following repeater is loaded from exported function from a public file. If they “are not accessible” how are they manipulating the repeater and furthermore retrieving information from those repeaters when choosing an option from those repeaters?

export function loadFilters(){
 var filterObj = JSON.parse(session.getItem('filterObj'))
  [...]
  loadSetColor(filterObj)
}
function loadSetColor(filterObj){
  $w('#setColorRepeater').onItemReady(($item, itemData, index) => {
    setColorOptionsItemReady($item, itemData, index, filterObj)
  })
  wixData.query('MyStore')
    .limit(100)
    .distinct('setColor')
    .then ((result) => {
      $w('#setColorRepeater').data = result.items.sort(function(a,b){
        return sortColors(a, b)
      })
 if(filterObj.setColor.length > 0){
        $w('#setColorContainer').expand()
        $w('#setColorShowIcon').hide()
        $w('#setColorHideIcon').show()
      }
  })
  setFilterTitleNumber('setColor', filterObj.setColor)
}