-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Labels
Milestone
Description
Package
filament/filament
Package Version
4.2.2
Laravel Version
12
Livewire Version
3
PHP Version
8.4
Problem description
When using searchable() with relationship() and preload() options, it display data for easy access. but when we don't have any data, it display empty state like image. This empty state is same as using ->options()
Select::make('district_id')
->required()
->relationship(name: 'district', titleAttribute: 'name')
// -> options(District::pluck('name', 'id')->toArray())
->searchable()
->preload()
Expected behavior
Since we preload() the data, if it's empty it should display empty state like below, maybe different message
Steps to reproduce
Use select on any resource with relationship and make the related empty
Select::make('district_id')
->required()
->relationship(name: 'district', titleAttribute: 'name') // should be null
// -> options(District::pluck('name', 'id'))
->searchable()
->preload()
Reproduction repository (issue will be closed if this is not valid)
https://github.com/filamentphp/demo
Relevant log output
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Todo