Search code examples
reactjsantd

How to remove a tooltip from a pagination component?


I don't know how to remove tooltip from a pagination element. I'm using antd's table. This table contains a pagination. It's a part of the table. I'm trying to customize it using styled-components library. I've tried to find all classes which is containing tooltip in their titles and set them:

display: none !important;

But there was no result. There should be some class that is used for this purpose which I have no idea.

I will be grateful if someone knows the solution for this issue.


Solution

  • The tooltip comes from the title attribute of <li/> elements.

    enter image description here

    Such behavior is by design, therefore you can't remove it.

    Alternative solutions which aren't recommended:

    • Implement Pagination by yourself, style it using the antd-css classes and integrate it with your custom Table.
    • Dynamically remove all title attributes by querying the dom.