Hi! I have a table with sorting, and I want to change tooltip text on the header cell
when hovering over a cell, the tooltip show 'Sort'
I need to show a value of column titlle
devextreme-reactive: 1.1.1
Hi,
聽
Use the messages property of the TableHeaderRow plugin:
<TableHeaderRow
// ...
messages={{
'sortingHint': 'your message...'
}}
/>
聽
Please refer to the Localization guide to get more information about other plugins' customization.
Ok, but my message should be different for every header cell,how can I pass there title of column?
I try to use another tooltip as same as I do with table body cell
<TableView.Cell {...props} >
<Tooltip
classes={{ tooltip: props.classes.tooltip, popper: props.classes.popper }}
id="tooltip-bottom-end"
placement="left-end"
title={props.value}
>
<span>
{props.value}
</span>
</Tooltip>
</TableView.Cell>
But i don't see my tooltib
Thank you for the clarification!
聽
To implement the functionality you described, use a custom cell component for the TableHeaderRow plugin as follows:
const Cell = ({ getMessage, column, ...restProps }) => (
<TableHeaderRow.Cell
column={column}
getMessage={() => `Sort by ${column.name}`}
{...restProps}
/>
);
See this example as well.
袧懈褔褢褋懈) Thank you a lot)
Hi All,
It appears that this functionality was affected by changes made in version 1.8.0-beta.1. Check the https://github.com/DevExpress/devextreme-reactive/blob/master/CHANGELOG.md#features-3 change log for more information. We are going to update our documentation and add information about this issue to the change log. In the meantime, you can use the following example which contains a working code snippet for version 1.10: https://codesandbox.io/s/1yw38r63
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests.
Most helpful comment
袧懈褔褢褋懈) Thank you a lot)