nextui
nextui copied to clipboard
[BUG] - Components/Table
Describe the bug
The table is re-rendered every time the mouse and keyboard are clicked. If you click sequentially first on the left mouse button, then on any button on the keyboard, the table will be rendered as a result 2 extra times. This is the sequence in which it works.
Your Example Website or App
https://codesandbox.io/s/zbgfe2?file=/App.js:0-1209&from-sandpack=true
Steps to Reproduce the Bug or Issue
- Open sandbox
- Activate flag in Profiler "Highlight updates when components render."
- Click the left mouse button anywhere.
- Table rerendered.
- Press any key on the keyboard.
- Table rerendered again!
- Repeat this as many times as you want and the table will be rerendered all the time.
Expected behavior
The table should not be re-rendered by pressing the keyboard and mouse.
Screenshots or Videos
Operating System Version
Linux
Browser
Chrome
Hello 👋, to help manage issues we automatically close stale issues. This issue has been automatically marked as stale because it has not had activity for quite some time. Has this issue been fixed, or does it still require the community's attention? > This issue will be closed in 10 days if no further activity occurs. Thank you for your contributions.
Hey @Yan-Zhelanov I couldn't see any re-render
on mouse hover, right/left click or pressing any keyboard key
https://user-images.githubusercontent.com/30373425/187081211-c899024b-dd62-47e2-8b34-3c195481c9f7.mov
@jrgarciadev how did you solve this issue?
Using the exact example in the nextui website. I can not get Topcontent to not rerender everytime I click anywhere in the table. Im trying to implement the searchInput in topContent. Impossible! Even with correct memoization and callbacks