Skip to content

Fix: Use event delegation for confirm to survive AJAX snippet updates#1272

Merged
f3l1x merged 1 commit intomasterfrom
fix/confirm-after-filter
Mar 17, 2026
Merged

Fix: Use event delegation for confirm to survive AJAX snippet updates#1272
f3l1x merged 1 commit intomasterfrom
fix/confirm-after-filter

Conversation

@radimvaculik
Copy link
Copy Markdown
Member

Summary

  • Fixes data-datagrid-confirm dialog not showing after a filter is applied (Bug - Confirm does not work after applying any filter #1250)
  • Direct click listeners were attached to confirm elements at init time; after AJAX snippet updates, those elements are replaced with fresh DOM nodes and the listeners are lost
  • Replaced with a single delegated listener on datagrid.el, which persists across snippet updates

Test plan

  • Open a datagrid with a confirm action button
  • Apply a text or select filter
  • Click the confirm button — dialog should appear as expected

Closes #1250

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 46.19%. Comparing base (e7c487d) to head (4e1f0fa).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1272   +/-   ##
=======================================
  Coverage   46.19%   46.19%           
=======================================
  Files          52       52           
  Lines        2680     2680           
=======================================
  Hits         1238     1238           
  Misses       1442     1442           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@radimvaculik radimvaculik requested a review from f3l1x March 17, 2026 06:46
@f3l1x f3l1x merged commit 27d84f1 into master Mar 17, 2026
11 checks passed
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.

Bug - Confirm does not work after applying any filter

2 participants