ngx-bootstrap icon indicating copy to clipboard operation
ngx-bootstrap copied to clipboard

feat(tabs): add beforeRemove event to allow canceling tab removal

Open valorkin opened this issue 11 months ago • 1 comments

Summary

  • Add beforeRemove event to TabDirective allowing cancellation of tab removal
  • Developers can now show confirmation dialogs or prevent removal by calling event.preventDefault()
  • Maintains full backward compatibility with existing removed event
  • Works with both programmatic removal and keyboard (Delete key) removal

Test plan

  • [x] beforeRemove event fires before tab removal
  • [x] event.preventDefault() successfully cancels removal
  • [x] removed event only fires if removal is not canceled
  • [x] Keyboard deletion (Delete key) respects cancellation
  • [x] Backward compatibility maintained for existing implementations
  • [x] Unit tests cover all cancellation scenarios and edge cases
  • [x] E2E tests verify behavior in real browser environment

🤖 Generated with Claude Code

valorkin avatar May 26 '25 16:05 valorkin

Deploying ngx-bootstrap with  Cloudflare Pages  Cloudflare Pages

Latest commit: d69b198
Status:🚫  Build failed.

View logs