Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: Missing Widget Titles -- Add additional null check for getHeading() within getLocalizedWidgetLabel() #495

Closed

Conversation

nickpoulos
Copy link

This null check is necessary because Filament\Widgets\StatsOverviewWidget.php always has a base getHeading() method.

This causes the "default" branch within the match statement to not execute, resulting in missing Widget titles.

image

See #493

This currently works as-is for the table widgets because it uses a different method name --> getTableHeading() and does not have a getHeading() method.

Adding this null check should give us the expected behavior.

image

…LocalizedWidgetLabel()

This check is necessary because Filament\Widgets\StatsOverviewWidget.php always has a base getHeading() method.

This causes the "default" branch within the match statement to not execute.

This currently works as-is for the table widgets because it uses a different method name --> getTableHeading() and does not have a getHeading() method.

Adding this null check should give us the expected behavior.
Copy link

what-the-diff bot commented Jan 22, 2025

PR Summary

  • Condition Update in getLocalizedWidgetLabel
    The validation process within the getLocalizedWidgetLabel function has been improved. Before using the getHeading() function on a particular application part (widget), the system now verifies it will not return an empty (null) value. This change helps maintain the application stability and avoids unexpected behavior or errors.

@nickpoulos
Copy link
Author

It seems this was addressed as part of #473.

I was not able to tell from the PR title.

@nickpoulos nickpoulos closed this Jan 23, 2025
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