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

feat: allow users to delete all table rows #3030

Merged
merged 3 commits into from
Oct 22, 2024

Conversation

eduardmarcinco
Copy link
Contributor

Closes #3006

@eduardmarcinco eduardmarcinco requested a review from a team as a code owner October 18, 2024 15:08
Copy link

netlify bot commented Oct 18, 2024

Deploy Preview for carbon-components-angular ready!

Name Link
🔨 Latest commit 5e3b692
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-angular/deploys/6712e0b065baf60008939c9a
😎 Deploy Preview https://deploy-preview-3030--carbon-components-angular.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Akshat55
Copy link
Contributor

Hey @eduardmarcinco this was basically the solution :P

But instead of setting all arrays to empty state, you could simplify it by call the data setter.

deleteAllRows() {
		this.data = [];
	}

The point of the issue is to provide a imperative approach to delete the data instead of manually calling this.data = [].

@Akshat55
Copy link
Contributor

I'll reopen the PR if that's fine with you!

@Akshat55 Akshat55 reopened this Oct 18, 2024
@eduardmarcinco
Copy link
Contributor Author

I'll reopen the PR if that's fine with you!

Yep, that's fine. Let me make some quick adjustments to code and the test.

@zvonimirfras zvonimirfras merged commit ec69414 into carbon-design-system:master Oct 22, 2024
14 checks passed
Copy link

🎉 This PR is included in version 5.46.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In TableModel(), there is no way to delete all rows in 1 command
3 participants