currentRefinements change label name

I want to change currentRefinament label name. For example, this value is displayed when Graphics category is selected: “Taxonomies.download_category: graphics”. I want to change the first part, “Taxonimies.download_category”

You can set up a custom rendering function for the currentRefinements widget and pass item.label to a function that translates it from one label to another if it is not desired. We have an example here in our documentation - let me know if this works for you. Thanks!

I did it. I used this code:

const facetMapping = {
‘taxonomies.download_category’: ‘Category’,
‘edd_price’: ‘Price’,
};

instantsearch.widgets.currentRefinements({
container: ‘#current’,
transformItems(items) {
return items.map(item => ({
…item,
// Here we add our extra attribute
label: facetMapping[item.label],
}));
}
}),