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

fix(Table): fixed row deletion bug on deselect #425

Merged

Conversation

johnpuaoi
Copy link
Contributor

Currently if you select all items in a table with the header checkbox and attempt to deselect a row by clicking on the row itself and not the checkbox, that row will be deleted from the rows prop. I believe this was caused by the @change because selected was being set to rows itself.

Switched to calling onSelect for all rows in a foreach when selecting all rows, so that that handler in the parent component can remove the item without removing it from rows.

I apologize in advance for any hiccups, this is my first PR ever (I'm a solo dev).

Mahalo!

@vercel
Copy link

vercel bot commented Jul 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
ui ✅ Ready (Inspect) Visit Preview Jul 18, 2023 10:51am

@nuxt-studio
Copy link

nuxt-studio bot commented Jul 18, 2023

Live Preview ready!

Name Edit Preview Latest Commit
ui Edit on Studio ↗︎ View Live Preview d2eb1f9

@benjamincanac benjamincanac changed the title bugfix(Table): fixed row deletion bug on deselect fix(Table): fixed row deletion bug on deselect Jul 18, 2023
@benjamincanac
Copy link
Member

Thanks 😊

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 this pull request may close these issues.

2 participants