Trouble updating UI widgets (some parameters seem to take, some don't) not sure where I'm going wrong

I’m somewhat new here and I’m basically not sure what I’m doing incorrectly and I feel like I might be missing something obvious. I’m setting up a real estate search with instantsearch.js and I have been able to use parameters to modify portions of the UI on the pre-provided widgets but some parameters seem like they aren’t functioning as intended per the documentation.

For example in refinementList

Trouble I’m having :

  • There is a searchablePlaceholder parameter that when added to my implementation doesn’t change anything in the UI.

  • There is a showMoreLimit parameter that when added to my implementation doesn’t change anything in the UI.

Here’s my current code for the widget:

search.addWidget(
  instantsearch.widgets.refinementList({
    container: "#neighborhoods",
    attributeName: "subdivision",
    limit: 4,
    showMore: true,
    showMoreLimit: 10,
    searchForFacetValues: true,
    searchablePlaceholder: "Search Neighborhoods",
    autoHideContainer: false,
    templates: {
      header: "Neighborhoods",
    }
  })
);

Issues :

  • Using the above, the placeholder text in the UI still reads the default “Search for other…”
  • I’m also getting 4 by default, then all results (not 10) when clicking show more.


I’m having a similar issue using the menuSelect widget, I’m wanting to change the default option text but I seem to be unable to.

search.addWidget(
  instantsearch.widgets.menuSelect({
    container: "#beddropdown",
    attributeName: "bedrooms",
    sortBy: ['name:asc'],
    
    templates: {
      defaultOption: 'Beds',
      header: "Beds",
      item: '{{label}}',
    },
    cssClasses: {
      select: [
        'form-select'
      ],
    },
  })
);

The default option still reads “See all”. Any pointing in the right direction would be appreciated.

Thanks!

Shot in the dark here, for the refinement list, can you add searchable: true,

My issue was I was using an outdated instant search file loaded locally rather than from a cdn. I was looking at current documentation yet using outdated files like a dum dum.

1 Like