Add toggleContent() method to Dropdown - #153
Open
WarLikeLaux wants to merge 6 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #153 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 327 329 +2
===========================================
Files 8 8
Lines 1038 1044 +6
===========================================
+ Hits 1038 1044 +6 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
|
@WarLikeLaux resolve conflicts, please |
vjik
reviewed
Jun 20, 2026
vjik
left a comment
Member
There was a problem hiding this comment.
What about adding support Stringable objects to label and respect NoEncodeInterface?
Seems, it resolves task without adding new methods.
Member
|
@WarLikeLaux added a test for label leaks. Please ensure the case is handled properly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds
toggleContent(string|Stringable $value)method toDropdownthat sets custom content for the toggle button instead of using the item label.Use cases
When the dropdown toggle should display something other than plain text - an icon, avatar image, or any
Stringablewidget:Without
toggleContent(), the toggle button renders the item'slabelas before.No BC break: new optional method, existing code unaffected.