File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,6 @@ class SelectTree extends Field implements HasAffixActions
3636
3737 protected bool $ alwaysOpen = false ;
3838
39- protected string $ emptyLabel = '' ;
40-
4139 protected bool $ independent = true ;
4240
4341 protected ?string $ customKey = null ;
@@ -138,6 +136,8 @@ protected function setUp(): void
138136
139137 $ this ->dehydrated (fn (SelectTree $ component ): bool => ! $ component ->getRelationship () instanceof BelongsToMany);
140138
139+ $ this ->placeholder (static fn (SelectTree $ component ): ?string => $ component ->isDisabled () ? null : __ ('filament-forms::components.select.placeholder ' ));
140+
141141 $ this ->suffixActions ([
142142 static fn (SelectTree $ component ): ?Action => $ component ->getCreateOptionAction (),
143143 ]);
@@ -338,7 +338,7 @@ public function expandSelected(bool $expandSelected = true): static
338338
339339 public function emptyLabel (string $ emptyLabel ): static
340340 {
341- $ this ->emptyLabel = $ emptyLabel ;
341+ $ this ->noSearchResultsMessage ( $ emptyLabel) ;
342342
343343 return $ this ;
344344 }
@@ -459,7 +459,7 @@ public function getDefaultOpenLevel(): int
459459
460460 public function getEmptyLabel (): string
461461 {
462- return $ this ->emptyLabel ? $ this -> evaluate ( $ this -> emptyLabel ) : __ ( ' No options match your search. ' );
462+ return $ this ->getNoSearchResultsMessage ( );
463463 }
464464
465465 public function getDirection (): string
You can’t perform that action at this time.
0 commit comments