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 ;
@@ -136,6 +134,8 @@ protected function setUp(): void
136134 return $ component ->getCustomKey ($ record );
137135 });
138136
137+ $ this ->placeholder (static fn (SelectTree $ component ): ?string => $ component ->isDisabled () ? null : __ ('filament-forms::components.select.placeholder ' ));
138+
139139 $ this ->suffixActions ([
140140 static fn (SelectTree $ component ): ?Action => $ component ->getCreateOptionAction (),
141141 ]);
@@ -336,7 +336,7 @@ public function expandSelected(bool $expandSelected = true): static
336336
337337 public function emptyLabel (string $ emptyLabel ): static
338338 {
339- $ this ->emptyLabel = $ emptyLabel ;
339+ $ this ->noSearchResultsMessage ( $ emptyLabel) ;
340340
341341 return $ this ;
342342 }
@@ -457,7 +457,7 @@ public function getDefaultOpenLevel(): int
457457
458458 public function getEmptyLabel (): string
459459 {
460- return $ this ->emptyLabel ? $ this -> evaluate ( $ this -> emptyLabel ) : __ ( ' No options match your search. ' );
460+ return $ this ->getNoSearchResultsMessage ( );
461461 }
462462
463463 public function getDirection (): string
You can’t perform that action at this time.
0 commit comments