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

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

Open
lanoow opened this issue May 7, 2024 · 1 comment · May be fixed by #2989
Open

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

lanoow opened this issue May 7, 2024 · 1 comment · May be fixed by #2989

Comments

@lanoow
Copy link

lanoow commented May 7, 2024

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

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

Successfully merging a pull request may close this issue.

1 participant