# Does setFilter() override Page Size?

**URL:** <https://forum.wixstudio.com/t/does-setfilter-override-page-size/32560>\
**Category:** Ask the community\
**Tags:** question, code\
**Created:** [June 20, 2020, 3:34am UTC](https://forum.wixstudio.com/t/does-setfilter-override-page-size/32560 "2020-06-20T03:34:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![neffdesign](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/neffdesign/32/17554_2.png) [@neffdesign](https://forum.wixstudio.com/u/neffdesign)\
**Post date:** [June 20, 2020, 3:34am UTC](https://forum.wixstudio.com/t/does-setfilter-override-page-size/32560/1 "2020-06-20T03:34:21Z")

</div>

I have a repeater set to a dataset with a filter configured in the dataset properties and a page size.

When the dataset initially loads it works perfectly per the pre-configured filter and page size.

Then I have the ability to filter the dataset via an input text field. I am using setFilter() to accomplish this.

The results returned per this new filter are as expected. However, it’s not abiding by the originally set page size. I can log the dataset’s page size and it still has what I configured.

How do I build a filter via code with a page size in order to “load more” via a function?

---

<div class="post-metadata">

**Author:** ![givemeawhisky](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/givemeawhisky/32/5383_2.png) [@givemeawhisky](https://forum.wixstudio.com/u/givemeawhisky)\
**Post date:** [June 20, 2020, 11:19am UTC](https://forum.wixstudio.com/t/does-setfilter-override-page-size/32560/2 "2020-06-20T11:19:59Z")

</div>

If you read the Wix Dataset API info you will find your answer.  
[https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setFilter](https://www.wix.com/corvid/reference/wix-dataset.Dataset.html#setFilter)

**Setting a dataset’s filter overrides existing filters that were previously set using the setFilter() function or using the Dataset Settings panel in the Editor.**

---

<div class="post-metadata">

**Author:** ![neffdesign](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/neffdesign/32/17554_2.png) [@neffdesign](https://forum.wixstudio.com/u/neffdesign)\
**Post date:** [June 20, 2020, 1:28pm UTC](https://forum.wixstudio.com/t/does-setfilter-override-page-size/32560/3 "2020-06-20T13:28:57Z")

</div>

Good Morning

I almost put the disclaimer that I have read the API reference documents which is what fueled my confusion.

Here are a few points maybe you could help clear up for me:

1. I read where setting a dataset’s filter overrides existing filters, but I couldn’t determine if PAGE SIZE was included in that. It’s a separate setting in the settings panel from filter and it’s a separate function in the API set.

2. If setting the filter does override the page size, then why is it when I call _getPageSize()_ after setting the filter it returns the original page size I set in the settings panel? If it does overwrite it I would expect it to comeback undefined or something.

3. MOST IMPORTANT…how do I properly set the filter AND a page size? It doesn’t look like I can pass the page size to the filter. If I call _setPageSize()_ and then call setFilter after does that not recurs back to “setting a dataset’s filter overrides existing filters…”. This was the crux of my question.

Thank you!
