[PR #1771] [MERGED] Add callback for Open and Close to RadzenDropDown #2892

Closed
opened 2026-01-29 18:20:56 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/radzenhq/radzen-blazor/pull/1771
Author: @mrfixij
Created: 11/4/2024
Status: Merged
Merged: 11/5/2024
Merged by: @enchev

Base: masterHead: master


📝 Commits (1)

  • 5103307 Add callback for Open and Close to RadzenDropDown

📊 Changes

3 files changed (+64 additions, -5 deletions)

View changed files

📝 Radzen.Blazor/RadzenDropDown.razor.cs (+40 -5)
RadzenBlazorDemos/Pages/DropDownOpenCloseEvent.razor (+18 -0)
📝 RadzenBlazorDemos/Pages/DropDownPage.razor (+6 -0)

📄 Description

Because the JS function signatures between openPopup and TogglePopup are incompatible, I had to break the ternary out to an if/else instead.

Unit testing this is possible but would require using substitutes and it appears that this project doesn't use substitutes or mocks - I didn't want to introduce that if that's not part of the culture of Radzen's tests.

Reference to this topic: https://forum.radzen.com/t/radzendropdown-lacking-onopen-and-onclosed-callbacks/18939


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/radzenhq/radzen-blazor/pull/1771 **Author:** [@mrfixij](https://github.com/mrfixij) **Created:** 11/4/2024 **Status:** ✅ Merged **Merged:** 11/5/2024 **Merged by:** [@enchev](https://github.com/enchev) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`5103307`](https://github.com/radzenhq/radzen-blazor/commit/51033075266467bb71e58fd06dc7ccbe3eb5bfbd) Add callback for Open and Close to RadzenDropDown ### 📊 Changes **3 files changed** (+64 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `Radzen.Blazor/RadzenDropDown.razor.cs` (+40 -5) ➕ `RadzenBlazorDemos/Pages/DropDownOpenCloseEvent.razor` (+18 -0) 📝 `RadzenBlazorDemos/Pages/DropDownPage.razor` (+6 -0) </details> ### 📄 Description Because the JS function signatures between openPopup and TogglePopup are incompatible, I had to break the ternary out to an if/else instead. Unit testing this is possible but would require using substitutes and it appears that this project doesn't use substitutes or mocks - I didn't want to introduce that if that's not part of the culture of Radzen's tests. Reference to this topic: https://forum.radzen.com/t/radzendropdown-lacking-onopen-and-onclosed-callbacks/18939 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 18:20:56 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#2892