CurrentRefinements - transformItems - passing Key in

I have currently got a CurrentRefinements widget with transformItems which returns 2 results, however i cannot figure out how to pass in a key which i need to avoid Proptype errors. so the question is how do i pass in a key?

code is:

<CurrentRefinements
   transformItems={
      items => items.map((i) => {
        if (!i.attributeName.startsWith('price.')) return i;
        return { ...i, label: i.label.replace(/\.(GBP|EUR|CAD|USD)/, '') };
    })}
/>

Hi @nritonsa,

Can you reproduce the error you have with key using the jsfiddle?

I just try in our storybook with a similar configuration and I wasn’t able to see any PropTypes issue.

<CurrentRefinements
          transformItems={items =>
            items.map(i => {
              if (!i.attributeName.startsWith('materials')) return i;
              return {
                ...i,
                label: 'myLabel',
              };
            })}
/>