React-virtualized: "[object Object]" appearing in tooltip when hovering column header

Created on 20 Jul 2018  路  1Comment  路  Source: bvaughn/react-virtualized

Hello, I think I'm facing an issue : when I put a React element in the label prop of a column, the tooltip "[object Object]" appears when I the cursor is hovering the column header :

<Table /* ... props */>
    <Column
      label={<LocalizedText id="WEB_LAST_MEASUREMENT" />}
      /* ... other props */
    />
</Table>

After inspecting the node, I can see that the span element in the header has its prop title containing the react element I declared as the label :

{
  children: {鈥,
  className: "ReactVirtualized__Table__headerTruncatedText",
  title: {,
    $$typeof: Symbol(react.element),
    _owner: FiberNode{鈥,
    _store: {鈥,
    key: null,
    props: {鈥,
    ref: null,
    type: LocalizedText()
  }
}

I think I can fix that by giving the Column a custom headerRenderer prop, but I don't think that's the expected behaviour. Or am I doing something wrong ?

bug

Most helpful comment

[EDIT]
are you doing something like:
const page = {
title: 'some title'
}
...

...

Cos if you do: you are passing title attribute which is responsible for the tooltip content

>All comments

[EDIT]
are you doing something like:
const page = {
title: 'some title'
}
...

...

Cos if you do: you are passing title attribute which is responsible for the tooltip content

Was this page helpful?
0 / 5 - 0 ratings