© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•4mo ago•
4 replies
Mohamed KhX

Feature Regression in v4 Select Component: Rendering a Blade View for noSearchResultsMessage

Hi

I've encountered a feature regression from v3 that was extremely valuable for our application's user experience

The Use Case: "Quick Create" from a Select Dropdown
In Filament 3, we could use noSearchResultsMessage in conjunction with allowHtml to render a full, interactive Blade view when a user's search yielded no results. This was perfect for a "quick create" feature. For example, if a user searched for a customer's phone number that didn't exist, a button would appear allowing them to create that customer on the fly without leaving the form

How it Worked in Filament 3
We would define our Select component like this

Select::make('customer_id')
->searchable()
->allowHtml()
->noSearchResultsMessage(fn(Select $component) => new HtmlString(
view('components.select-quick-create', [
'statePath' => $component->getStatePath(),
])
));

And our select-quick-create.blade.php component contained Alpine.js and Livewire actions:

```html
<div x-data="{}">
<p>No customer found.</p>
<button x-on:click.prevent="$wire.quickCreateCustomer()">
Create & Select "<strong x-text="select.input.value"></strong>"
</button>
</div>

The Issue in Filament 4:
In Filament 4 for understandable security reasons (preventing XSS) the noSearchResultsMessage now treats its content as plain text The same code now renders the raw HTML tags as a string or simply [object Object] if an HtmlString object is passed The allowHtml() method no longer affects this behavior

This removes the ability to create this seamless "quick create" UX directly within the dropdown

Would it be possible to introduce a new dedicated method for this functionality that explicitly renders a Blade view? This would restore the powerful UX pattern in a secure and deliberate way
Something like ->searchNotFoundView(view.name) or ->noSearchResultsView('view.name') would be an amazing addition and would align with other ...View() methods in the framework
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Rendering a table in a Blade view V3 to V4 Issues
FilamentFFilament / ❓┊help
6mo ago
Rendering a table in a blade view
FilamentFFilament / ❓┊help
2mo ago
Select Blade Component - Searchable
FilamentFFilament / ❓┊help
2y ago
Choice.js Select Blade Component
FilamentFFilament / ❓┊help
3y ago