Grouping refinement list options

Hi, I’m trying to create a custom refinement list where I can group the values into one selected. But I’m unsure how to do this, I’m using the react instasearch.

  1. I have posts that are indexed with their uids.
  2. When a user visits the posts page, I retrieve an array with all the post uid’s that the current logged in user has created (author).
  3. I want to create a custom filter/refinement list with a button/radio Only show my posts and Hide my posts and Show All
  4. Choosing one of those options should update the search filter accordingly.

I tried creating a custom RefinementList and then manually update my url query string but then I need to completely reload the page to update the searchState.

I’m running on nextjs.

Any help/ideas/solutions will be highly appreciated. :star: