# Enhancing User Experience with Filtered Results

**URL:** <https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860>\
**Category:** Attributes\
**Tags:** cmsfilter, attributes-api\
**Created:** [May 4, 2024, 10:28am UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860 "2024-05-04T10:28:39Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)\
**Post date:** [May 24, 2024, 10:14am UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/21 "2024-05-24T10:14:16Z")

</div>

Hey @sitegrowteam! We currently have the Combobox solution with Attributes → [Combo Box for Webflow](https://finsweet.com/attributes/combo-box)

However, it is not CMS Compatible yet. There is an open feature request for this, so we may be able to add this functionality for the V2 release

---

<div class="post-metadata">

**Author:** ![sitegrowteam](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/sitegrowteam/32/2260_2.png) [@sitegrowteam](https://forum.finsweet.com/u/sitegrowteam)\
**Post date:** [May 24, 2024, 11:37am UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/22 "2024-05-24T11:37:08Z")

</div>

Hi @Support-Luis,

Great! I will look into using the Combobox solution. If it’s made CMS compatible in the V2 release, I can switch to that.

Thanks!

---

<div class="post-metadata">

**Author:** ![sitegrowteam](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/sitegrowteam/32/2260_2.png) [@sitegrowteam](https://forum.finsweet.com/u/sitegrowteam)\
**Post date:** [May 24, 2024, 4:50pm UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/23 "2024-05-24T16:50:11Z")

</div>

Hi @Support-Luis,

I’ve encountered an issue that I need your support with. The custom code within a collection item is not running after pagination. Initially, for each property’s price and square feet, I set the fields in the collection to text fields so I could manually add commas to separate the numerical values. Now, I’ve changed the fields to number fields and used custom code to separate the values (price and square feet) with commas, which works fine on the first page.

However, when I paginate to the next page, the custom code doesn’t get applied anymore. From the second page onwards, the prices and square footage don’t get separated with commas. I’m not entirely sure, but I read somewhere that someone had a similar issue, and it seems like it might be because I’m using Finsweet’s CMS Load pagination.

Could you please look into this? So far, I’ve been testing this only on the “Properties” page, so to examine this issue, including the code, please focus on that page. Once this issue is resolved, I would like to implement the same solution on the “For Sale”, “For Rent”, and “Off Plan” pages.

Here’s my Read-Only: [Link](https://preview.webflow.com/preview/wcapital?utm_medium=preview_link&utm_source=designer&utm_content=wcapital&preview=c31537e6e05ade5c9b0f274cc78863fc&pageId=65fd5b32ead0ab46cd69b91a&workflow=preview)

Thank you!

---

<div class="post-metadata">

**Author:** ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)\
**Post date:** [May 27, 2024, 8:45am UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/24 "2024-05-27T08:45:24Z")

</div>

Hey @sitegrowteam! We can use the CMS Filter callback to run your comma snippet each time items are rendered, for example when we filter the list or paginate the list.

Here is the updated code 😉

```js
<!-- Comma Separated Values -->
<script>
  window.fsAttributes = window.fsAttributes || [];
  window.fsAttributes.push([
    'cmsfilter',
    (filterInstances) => {
      console.log('cmsfilter Successfully loaded!');

      function addCommas() {
        var numBlocks = document.querySelectorAll('#comma');
        for (var i = 0; i < numBlocks.length; i++) {
          var num = parseFloat(numBlocks[i].textContent.replace(/,/g, ''));
          if (!isNaN(num)) {
            numBlocks[i].textContent = num.toLocaleString();
          }
        }
      }

      const [filterInstance] = filterInstances;

      addCommas();

      filterInstance.listInstance.on('renderitems', (renderedItems) => {
        console.log(renderedItems);
        addCommas();
      });
    },
  ]);
</script>

```

---

<div class="post-metadata">

**Author:** ![sitegrowteam](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/sitegrowteam/32/2260_2.png) [@sitegrowteam](https://forum.finsweet.com/u/sitegrowteam)\
**Post date:** [May 27, 2024, 3:37pm UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/25 "2024-05-27T15:37:56Z")

</div>

Hey @Support-Luis,

This works perfectly. Thanks a lot! Additionally, you’ll see on the published site that each property item has an animation where the image scales slightly when hovered over. However, on the properties page, when you paginate to the next page, the images do not scale from the second page onwards. Could you please take a look at this issue?

Thanks again.

---

<div class="post-metadata">

**Author:** ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)\
**Post date:** [May 27, 2024, 7:03pm UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/26 "2024-05-27T19:03:19Z")

</div>

Hey @sitegrowteam! We can use this option to reset Webflow’s interaction engine on each rendering.

 ![Screenshot 2024-05-27 at 21.02.06](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/2X/9/9b419c257e92a3b406b32c62908a3ed4073d7aea.png)

Just be sure that initial states are not used as they will break the animations.

---

<div class="post-metadata">

**Author:** ![sitegrowteam](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/sitegrowteam/32/2260_2.png) [@sitegrowteam](https://forum.finsweet.com/u/sitegrowteam)\
**Post date:** [May 29, 2024, 10:01pm UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/27 "2024-05-29T22:01:44Z")

</div>

Hi Luis,

I will test this out and let you know how it goes.

Meanwhile, I have another issue I’d like you to look at. I’m facing a problem with the Finsweet active state. As shown in the screenshot, the text doesn’t turn white for the Amenities, Bedrooms, and Bathrooms filters in the active state. I made sure to specify that the typography should be white and the background black. When you click on each one, it takes the black background color from the active state div but not the white typography. This is very strange, and I’ve tried multiple ways to fix it. Please see the attached screenshots for reference.

 ![Screenshot 2024-05-30 at 1.57.06 AM](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/2X/f/fcf2f8cf445cfed1b4e5282b7bb456e8fb75c2ad.jpeg)

Here’s my Read-Only: [Link](https://preview.webflow.com/preview/wcapital?utm_medium=preview_link&utm_source=designer&utm_content=wcapital&preview=c31537e6e05ade5c9b0f274cc78863fc&pageId=65fd5b32ead0ab46cd69b91a&workflow=preview)

Here is the hosted site: [Link 2](https://www.site-grow.com/properties)  
Note: You can click on “More Filters” to open the Advanced filters window. To open the window in the designer, you will have to set More-Filters-Pop-Up to display: Flex

Thank you.

---

<div class="post-metadata">

**Author:** ![sitegrowteam](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/sitegrowteam/32/2260_2.png) [@sitegrowteam](https://forum.finsweet.com/u/sitegrowteam)\
**Post date:** [May 30, 2024, 9:48am UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/28 "2024-05-30T09:48:56Z")

</div>

Hey @Support-Luis,

Update: the `fs-cmsload-resetix` attribute works perfectly and all of the animations/interactions are working after pagination.

Thank you!

---

<div class="post-metadata">

**Author:** ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)\
**Post date:** [May 31, 2024, 10:01am UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/29 "2024-05-31T10:01:32Z")

</div>

Great to hear! Are you still facing issues with the active state?

---

<div class="post-metadata">

**Author:** ![sitegrowteam](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/sitegrowteam/32/2260_2.png) [@sitegrowteam](https://forum.finsweet.com/u/sitegrowteam)\
**Post date:** [May 31, 2024, 11:19am UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/30 "2024-05-31T11:19:59Z")

</div>

Hi @Support-Luis,

Yes, I am still facing issues with the active state. Still unable to get the typography to be white.

Thanks

---

<div class="post-metadata">

**Author:** ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)\
**Post date:** [June 1, 2024, 9:55am UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/31 "2024-06-01T09:55:32Z")

</div>

Hey @sitegrowteam! I’m not sure if the variables could be causing an issue here… Can we try without using the variables for the colors?

Here is a very nice tutorial on how to add the active class →

[![](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/2X/5/5520be2f860b97cb562faccb1fba7fdf9fa89ec3.jpeg "(2022) Webflow CMS Filter Active Class | No-Code Attributes") ](https://www.youtube.com/watch?v=CrBumEUQowI)

---

<div class="post-metadata">

**Author:** ![sitegrowteam](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/sitegrowteam/32/2260_2.png) [@sitegrowteam](https://forum.finsweet.com/u/sitegrowteam)\
**Post date:** [June 1, 2024, 10:24am UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/32 "2024-06-01T10:24:05Z")

</div>

Hi @Support-Luis,

This is actually the exact tutorial I watched while implementing this, and I followed the steps in the video. Regarding the variables, I disconnected all of them from the color variables as suggested, but unfortunately, the problem persists.

Thank you.

---

<div class="post-metadata">

**Author:** ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)\
**Post date:** [June 10, 2024, 9:41am UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/33 "2024-06-10T09:41:45Z")

</div>

Thank you for testing the variables! I will take another look

---

<div class="post-metadata">

**Author:** ![sitegrowteam](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/sitegrowteam/32/2260_2.png) [@sitegrowteam](https://forum.finsweet.com/u/sitegrowteam)\
**Post date:** [June 10, 2024, 10:04am UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/34 "2024-06-10T10:04:18Z")

</div>

Hey @Support-Luis,

Sure! Thank you! By the way, the amenities filters are now working properly. However, the bedrooms and bathrooms filters are still not getting the white text, and I still cannot figure out why. Please have a look.

Here’s my Read-Only: [Link](https://preview.webflow.com/preview/wcapital?utm_medium=preview_link&utm_source=designer&utm_content=wcapital&preview=c31537e6e05ade5c9b0f274cc78863fc&pageId=65fd5b32ead0ab46cd69b91a&workflow=preview)

Here is the hosted site: [Link 2](https://wcapital.webflow.io/properties)  
Note: You can click on “More Filters” to open the Advanced filters window. To open the window in the designer, you will have to set More-Filters-Pop-Up to display: Flex

Thank you.

---

<div class="post-metadata">

**Author:** ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)\
**Post date:** [June 10, 2024, 3:56pm UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/35 "2024-06-10T15:56:41Z")

</div>

Hey @sitegrowteam

We seem to have several issues here, one is that this label class is preventing the text color from changing once the active class is set. You can simply remove it 🙂

 ![Screenshot 2024-06-10 at 17.46.50](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/2X/3/3e1bc3a84932ed7a4f7a0403cd0837557040b92c.jpeg)

Another issue is that for whatever reason, the `bedroom-checkbox` class does not behave like the `amenity-checkbox`. If I replace the class name for the bedrooms and baths filter then these checkboxes work as expected.

Here is a quick video on what I found  
https://www.loom.com/embed/fb41d2f8fda54435a6f9e0fcbe15d1a7

---

<div class="post-metadata">

**Author:** ![sitegrowteam](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/sitegrowteam/32/2260_2.png) [@sitegrowteam](https://forum.finsweet.com/u/sitegrowteam)\
**Post date:** [June 10, 2024, 5:39pm UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/36 "2024-06-10T17:39:03Z")

</div>

Hey @Support-Luis,

This works perfectly! Tthank you so much!

I do have another issue to bring to your attention regarding the results count. It seems that due to pagination, the results count isn’t working properly. For example, on the properties page, I have 20 properties. When the page first loads, the results count shows “Showing 20 results of 9.” This indicates that while the count of the results being shown is accurate, the total count (“of 9”) is incorrect. I believe this is due to the pagination, as 9 refers to the number of items shown on the first page of the pagination. Please have a look at this.

See attached screenshot:

 ![Screenshot 2024-06-10 at 9.37.50 PM](https://europe1.discourse-cdn.com/flex013/uploads/finsweet1/original/2X/1/12769379affb765cb5988324cff77522d2d5a723.jpeg)

Here’s my Read-Only: [Link](https://preview.webflow.com/preview/wcapital?utm_medium=preview_link&utm_source=designer&utm_content=wcapital&preview=c31537e6e05ade5c9b0f274cc78863fc&pageId=65fd5b32ead0ab46cd69b91a&workflow=preview)

Here is the hosted site: [Link 2](https://eliteproperties.webflow.io/properties)

Thank you.

---

<div class="post-metadata">

**Author:** ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)\
**Post date:** [June 10, 2024, 6:03pm UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/37 "2024-06-10T18:03:52Z")

</div>

Hey @sitegrowteam! The correct attribute to use there is `fs-cmsfilter-element="items-count"`.

Seems that you’ve mixed up some solutions 😉

---

<div class="post-metadata">

**Author:** ![sitegrowteam](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/sitegrowteam/32/2260_2.png) [@sitegrowteam](https://forum.finsweet.com/u/sitegrowteam)\
**Post date:** [June 10, 2024, 6:32pm UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/38 "2024-06-10T18:32:06Z")

</div>

Hey @Support-Luis,

Actually, `"items-count"` is what I initially had as the value when I first tried it but I faced the same issue then. Either way, on the properties page, I just changed it back to `"items-count"` and the issue still persists.

Thank you.

---

<div class="post-metadata">

**Author:** ![Support-Luis](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/support-luis/32/53_2.png) [@Support-Luis](https://forum.finsweet.com/u/Support-Luis)\
**Post date:** [June 11, 2024, 9:31am UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/39 "2024-06-11T09:31:15Z")

</div>

Hey @sitegrowteam! The element has been removed. Have you decided not to use this anymore?

---

<div class="post-metadata">

**Author:** ![sitegrowteam](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.finsweet.com/sitegrowteam/32/2260_2.png) [@sitegrowteam](https://forum.finsweet.com/u/sitegrowteam)\
**Post date:** [June 11, 2024, 11:22am UTC](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860/40 "2024-06-11T11:22:37Z")

</div>

Hey @Support-Luis,

Apologies for the confusion. I temporarily hid it for some reason, but it’s back now, and you can take a look. On the properties page, even after changing it back to “items-count,” the issue still persists, and it doesn’t work properly.

Here’s my Read-Only: [Link](https://preview.webflow.com/preview/eliteproperties?utm_medium=preview_link&utm_source=designer&utm_content=eliteproperties&preview=c31537e6e05ade5c9b0f274cc78863fc&pageId=65fd5b32ead0ab46cd69b91a&workflow=preview)

Here is the hosted site: [Link 2](https://eliteproperties.webflow.io/properties)

Thank you.

[Previous page](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860.md?page=1)

[Next page](https://forum.finsweet.com/t/enhancing-user-experience-with-filtered-results/2860.md?page=3)
