nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - Components/Table

Open Yan-Zhelanov opened this issue 2 years ago • 1 comments

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

  1. Open sandbox
  2. Activate flag in Profiler "Highlight updates when components render."
  3. Click the left mouse button anywhere.
  4. Table rerendered.
  5. Press any key on the keyboard.
  6. Table rerendered again!
  7. 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

Screenshot_20220525_152510 Screenshot_20220525_152605

Operating System Version

Linux

Browser

Chrome

Yan-Zhelanov avatar May 25 '22 12:05 Yan-Zhelanov

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.

stale[bot] avatar Jul 24 '22 12:07 stale[bot]

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 avatar Aug 28 '22 15:08 jrgarciadev

@jrgarciadev how did you solve this issue?

whalemare avatar Feb 05 '24 18:02 whalemare

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

jimmailcamp avatar Mar 04 '24 17:03 jimmailcamp