[object Object] in subheading
Hi all,
I'm trying to embed a component in the subheading of a card. The component is basically to format a number and more information can be found here: https://www.npmjs.com/package/react-number-format
When I try to do this, I'm seeing [object Object] on the UI. This the example code: ` <Card subheading={<NumberFormat value={totalProducts} displayType={'scrapd'} thousandSeparator={true} />}
`
And here is what I see on the UI:

Any reason why this is not supported or is this a bug?
Bram
Hi @brampurnot
currently the subheading prop is only accepting strings as value (documentation), React nodes or any other elements are not supported.
Since the Card component is developed by the ui5-webcomponents team, I'll transfer this issue to their repo so they can respond to your request as well.
Hi @brampurnot
UI5 Web Components will cast anything that is passed to a string property unless a string is passed, so basically you can't bind an object to a string property.
As much as I can read from the docs of react-number-format, you can bind to the value property of the object that you already have(the value property is String, so everything should be fine)