Search code examples
javascriptantd

Antd: How to change tooltip label on table sorter


I'm new using Antd, I've create a table with sort functionalities, but I need to change the text on the tooltip of the sorter.

Sorter tooltip:-

enter image description here

Thanks in advance, if you need any extra code snippet just please let me know.


Solution

  • I was able to solve it this way:

    <Table showSorterTooltip={{ title: 'Clic para ordenar' }}
           columns={tableColumn}
           dataSource={item}
           rowClassName='ps-pointer'
           rowKey={record => record.codigo_pedido_compra}
           style={{ cursor: 'pointer' }}
      />
    

    The trick is to use the showSorterTooltip property.