|
2 | 2 |
|
3 | 3 | namespace Backstage\Fields; |
4 | 4 |
|
5 | | -use Filament\Forms; |
6 | | -use Backstage\Fields\Base; |
7 | | -use Backstage\Fields\Models\Field; |
8 | 5 | use Backstage\Fields\Concerns\HasAffixes; |
9 | 6 | use Backstage\Fields\Concerns\HasOptions; |
10 | 7 | use Backstage\Fields\Contracts\FieldContract; |
| 8 | +use Backstage\Fields\Models\Field; |
| 9 | +use Filament\Forms; |
11 | 10 | use Filament\Forms\Components\Select as Input; |
12 | 11 |
|
13 | 12 | class Select extends Base implements FieldContract |
@@ -107,45 +106,45 @@ public function getForm(): array |
107 | 106 | ->label(__('Preload')) |
108 | 107 | ->live() |
109 | 108 | ->inline(false) |
110 | | - ->visible(fn(Forms\Get $get): bool => $get('config.searchable')), |
| 109 | + ->visible(fn (Forms\Get $get): bool => $get('config.searchable')), |
111 | 110 | ])->columnSpanFull(), |
112 | 111 | self::optionFormFields(), |
113 | 112 | self::affixFormFields(), |
114 | 113 | Forms\Components\Grid::make(2) |
115 | 114 | ->schema([ |
116 | 115 | Forms\Components\TextInput::make('config.loadingMessage') |
117 | 116 | ->label(__('Loading message')) |
118 | | - ->visible(fn(Forms\Get $get): bool => $get('config.searchable')), |
| 117 | + ->visible(fn (Forms\Get $get): bool => $get('config.searchable')), |
119 | 118 | Forms\Components\TextInput::make('config.noSearchResultsMessage') |
120 | 119 | ->label(__('No search results message')) |
121 | | - ->visible(fn(Forms\Get $get): bool => $get('config.searchable')), |
| 120 | + ->visible(fn (Forms\Get $get): bool => $get('config.searchable')), |
122 | 121 | Forms\Components\TextInput::make('config.searchPrompt') |
123 | 122 | ->label(__('Search prompt')) |
124 | | - ->visible(fn(Forms\Get $get): bool => $get('config.searchable')), |
| 123 | + ->visible(fn (Forms\Get $get): bool => $get('config.searchable')), |
125 | 124 | Forms\Components\TextInput::make('config.searchingMessage') |
126 | 125 | ->label(__('Searching message')) |
127 | | - ->visible(fn(Forms\Get $get): bool => $get('config.searchable')), |
| 126 | + ->visible(fn (Forms\Get $get): bool => $get('config.searchable')), |
128 | 127 | Forms\Components\TextInput::make('config.searchDebounce') |
129 | 128 | ->numeric() |
130 | 129 | ->minValue(0) |
131 | 130 | ->step(100) |
132 | 131 | ->label(__('Search debounce')) |
133 | | - ->visible(fn(Forms\Get $get): bool => $get('config.searchable')), |
| 132 | + ->visible(fn (Forms\Get $get): bool => $get('config.searchable')), |
134 | 133 | Forms\Components\TextInput::make('config.optionsLimit') |
135 | 134 | ->numeric() |
136 | 135 | ->minValue(0) |
137 | 136 | ->label(__('Options limit')) |
138 | | - ->visible(fn(Forms\Get $get): bool => $get('config.searchable')), |
| 137 | + ->visible(fn (Forms\Get $get): bool => $get('config.searchable')), |
139 | 138 | Forms\Components\TextInput::make('config.minItemsForSearch') |
140 | 139 | ->numeric() |
141 | 140 | ->minValue(0) |
142 | 141 | ->label(__('Min items for search')) |
143 | | - ->visible(fn(Forms\Get $get): bool => $get('config.searchable')), |
| 142 | + ->visible(fn (Forms\Get $get): bool => $get('config.searchable')), |
144 | 143 | Forms\Components\TextInput::make('config.maxItemsForSearch') |
145 | 144 | ->numeric() |
146 | 145 | ->minValue(0) |
147 | 146 | ->label(__('Max items for search')) |
148 | | - ->visible(fn(Forms\Get $get): bool => $get('config.searchable')), |
| 147 | + ->visible(fn (Forms\Get $get): bool => $get('config.searchable')), |
149 | 148 | ]), |
150 | 149 | ]), |
151 | 150 | ])->columnSpanFull(), |
|
0 commit comments