How to modify attribute name when query is displayed in the current refinements?

For example, when I select Ad Score, it displays the attribute name in the Current Refinements. I want it to say just “Ad Score” instead of “ad_score_unicorn”

Screen Shot 2020-11-18 at 3.16.29 PM

My code is below.

Hey @artin, you can use the transformItems prop for this.

Can you please give me an example of how to use it based on my code?

Hi @artin, here is a Codesandbox for using “transformItems” to change the style of the refinement name based on background color:

You can use similar code to alter the name.