nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - Switch component inside of table is trigger when a row is selected

Open lanoow opened this issue 9 months ago • 1 comments

NextUI Version

2.3.6

Describe the bug

I have a products table: image

When the switch is set active, there's no problem when selecting the row, however when the switch is inactive whenever I select the row it toggles the switch. scrnli_5_7_2024_10-32-43 AM.webm

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Create a table component
  2. Add a Switch component to the row
  3. Set it active on page load using useState
  4. Click on the row - nothing will happen.
  5. Toggle it to inactive
  6. Click on the row and it will toggle with the row selection

Expected behavior

I expected it to not change on row selection no matter what the state of the switch is but what I'm seeing is a change.

Screenshots or Videos

No response

Operating System Version

Windows

Browser

Chrome

lanoow avatar May 07 '24 07:05 lanoow

Reopening - the PR includes breaking changes. Now it's rescheduled to v.2.5.0.

wingkwong avatar Sep 14 '24 16:09 wingkwong

@wingkwong Hi, when do you release a new version to fix this issue?

quinhatpy avatar Sep 24 '24 06:09 quinhatpy

Next release will include lots of changes. we plan to release some beta versions first. hopefully next month.

wingkwong avatar Sep 24 '24 07:09 wingkwong