Skip to content

Add emptyText() to Menu and Dropdown#139

Open
WarLikeLaux wants to merge 1 commit intoyiisoft:masterfrom
WarLikeLaux:add-empty-text
Open

Add emptyText() to Menu and Dropdown#139
WarLikeLaux wants to merge 1 commit intoyiisoft:masterfrom
WarLikeLaux:add-empty-text

Conversation

@WarLikeLaux
Copy link
Contributor

Q A
Is bugfix?
New feature? ✔️
Docs added?
Tests added? ✔️
Breaks BC?

What does this PR do?

Add emptyText() to Menu and Dropdown. When all items are invisible (or the items array is empty) and emptyText is set, the widget renders a container with the empty text instead of returning ''.

New methods: emptyText(), emptyTextAttributes(), emptyTextTag().

No BC break: emptyText defaults to '', preserving current behavior (return empty string).

@codecov
Copy link

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e57424b) to head (4831c1f).

Additional details and impacted files
@@             Coverage Diff             @@
##              master      #139   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity       283       295   +12     
===========================================
  Files              8         8           
  Lines            892       932   +40     
===========================================
+ Hits             892       932   +40     

☔ 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.

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.

1 participant