#Inputs/Textareas placeholder returns [object Object]

4 messages · Page 1 of 1 (latest)

uncut rune
#

Hi,

With "Textarea" component for example, if I do it:

<Textarea placeholder="Hello world">

it works, but when I want to use it with react-i18next, it shows [object Object] as placeholder, ex:

<Textarea placeholder={t('test')}>

It works as expected with label, description props but "placeholder" does not like it, I don't know why?

Versions:
"@mantine/core": "^7.4.2",
"@mantine/form": "^7.5.0",
"@mantine/hooks": "^7.4.2",

#

Strange, I did some tests, it worked with

<Textarea placeholder={MyTranslateComponent('test')}>

but it does not work with

<Textarea placeholder={<MyTranslateComponent path="test"/>}>

why? It works with label, description in this way, only placeholder does not want to work

frigid dove
uncut rune
#

And is it normal that is works with label, description and not placeholder? The behaviour is strange