Current Refinements widget

Hi
I am using InstantSearch.js and I add the Current Refinements widget to my page search result.

instantsearch.widgets.currentRefinements({

            container: '#algolia-current-refinements-placeholder',

        }),

The widget working good, but I have a small issue and I cannot find any solution to solve this issue,
When the page result loading for the first time, I am seeing that there is a filter that already appears without any click on any filter, on my site is the first level of the categories.

My Q is, how to remove the first filter that loading when the page resolute loading in the first time?

Thanks

Can you give us code example. through codepen.

Check if there is any filter button been triggered when your page load

Yes, please

You are setting values to initialUiState when enableInstantSearch function call. hierarchicalMenuValue always having a value

If you do console.log for initialUiState you should see default values in it.
For fun remove initialUiState from the instantsearch({…})

var search = instantsearch({
        indexName: config.productsIndex,
        searchClient: config.searchClient,
        // initialUiState: initialUiState,
        insightsClient: window.aa
    });

And check still that filter button been selected

Thanks, it’s working but now I need to check why I didn’t see the {{query}} parameter

try enabaling route like this

var search = instantsearch({
    indexName: config.productsIndex,
    searchClient: config.searchClient,
    // initialUiState: initialUiState,
    insightsClient: window.aa,
    routing: true
});

@amontecalvo Were you able to figure this out ?