Closed
Description
Description
On the search results page (e.g.) we use the <CounterLabel>
element, which is rendering "([object Object])":
<span class="_VisuallyHidden__VisuallyHidden-sc-11jhm7a-0 rTZSs"> ([object Object])</span>
Which is not great.
CounterLabel
should render this correctly or be updated to only accept string children.
Steps to reproduce
We use CounterLabel
like this
<CounterLabel data-testid="resolved-count-label" sx={{height: 20, lineHeight: '20px', py: 0, px: 2}}>
<Count isLowerBound={resultCountIsLowerBound} value={totalResults} />
</CounterLabel>
But CounterLabel has code that renders this:
<VisuallyHidden> {`(${children})`}</VisuallyHidden>
Which doesn't work for children that aren't simple strings.
Version
35.18.0
Browser
Chrome, Safari, Firefox, Edge, iOS Safari