Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table expandedRowRender triggers on mouse movement in the table #33342

Closed
1 task done
roelvdboom opened this issue Dec 17, 2021 · 10 comments
Closed
1 task done

Table expandedRowRender triggers on mouse movement in the table #33342

roelvdboom opened this issue Dec 17, 2021 · 10 comments

Comments

@roelvdboom
Copy link

roelvdboom commented Dec 17, 2021

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. Create a Table with expandable rows and log each time the expandedRowRender function is called.
  2. Hover over the table rows and view the log output.

What is expected?

Only trigger the expandedRowRender function when the row is being expanded.

What is actually happening?

The expandedRowRender function is being triggered on every mouse movement inside the table.

Environment Info
antd 4.17.3
React 18.0.0
System Ubuntu 20.04
Browser Chrome

Working correctly in version 4.16.13. Seems to be a problem since 4.17.0.

@roelvdboom
Copy link
Author

While doing some more investigation about this issue. The problem seems to be introduced in the following commit: 2bb9407

The problem is introduced in rc-table version 7.19.0. When upgrading rc-table to 7.21.0 the problem seems to be fixed.

roelvdboom added a commit to roelvdboom/ant-design that referenced this issue Dec 17, 2021
@kid1412z
Copy link

kid1412z commented Dec 21, 2021

I have the same issue:
antd: 4.17.1
react :17.0.2
system: MacOS 11.4
Browser: Chrome

@tungphien
Copy link

Still get the error re-render when update rc-table to 7.21.0 version. Any suggest for me pls

@roelvdboom
Copy link
Author

@tungphien use resolutions in your package.json file to temporarily upgrade the rc-table package to version 7.21.0 till they release a new ANTD version with the new rc-table version.

In your package.json add the following on root level.

"resolutions": {
    "antd/rc-table": "7.21.0"
}

Make sure to delete the resolution after upgrading to a new ANTD version.

@tungphien
Copy link

image
image
image
image
@roelvdboom
Any ideal

@kid1412z
Copy link

image image image image @roelvdboom Any ideal

I down grade Antd version to solve this problem temporarily. In package.json: change to this: "antd": "~4.16.0",

@afc163 afc163 mentioned this issue Dec 27, 2021
15 tasks
@afc163
Copy link
Member

afc163 commented Dec 28, 2021

@afc163 afc163 closed this as completed Dec 28, 2021
@tungphien
Copy link

image
https://codesandbox.io/s/antd-table-expandedrowrender-keeps-rendering-on-hover-forked-7wsr6?file=/index.js

@PauloMesquitaSP
Copy link

The problem is still happening here

@Webbrother
Copy link

[email protected]
The problem is still reproducing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants