You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #401 [Autocomplete] Allow plugins to be disabled through tom_select_options.plugins.<plugin> = false (Kocal)
This PR was merged into the 2.x branch.
Discussion
----------
[Autocomplete] Allow plugins to be disabled through `tom_select_options.plugins.<plugin> = false`
| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | no
| Tickets | Fix#379
| License | MIT
When plugins option is defined Symfony UX will no longer add some plugins by default. This make it possible to render a autocomplete without clear button extensions for example.
Commits
-------
29486c8 [Autocomplete] Allow plugins to be disabled through `tom_select_options.plugins.<plugin> = false`
Copy file name to clipboardExpand all lines: src/Autocomplete/CHANGELOG.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,33 @@
1
1
# CHANGELOG
2
2
3
+
## 2.28.0
4
+
5
+
- Default plugins like `clear_button` or `remove_button` can now be removed when setting their value to `false` in the `tom_select_options.plugins` option, for example:
6
+
```php
7
+
<?php
8
+
#[AsEntityAutocompleteField]
9
+
class IngredientAutocompleteType extends AbstractType
10
+
{
11
+
public function configureOptions(OptionsResolver $resolver): void
12
+
{
13
+
$resolver->setDefaults([
14
+
'class' => Ingredient::class,
15
+
'tom_select_options' => [
16
+
'plugins' => [
17
+
'clear_button' => false, // Disable the clear button
18
+
'remove_button' => false, // Disable the remove button
19
+
],
20
+
],
21
+
]);
22
+
}
23
+
24
+
public function getParent(): string
25
+
{
26
+
return BaseEntityAutocompleteType::class;
27
+
}
28
+
}
29
+
```
30
+
3
31
## 2.25.0
4
32
5
33
- Escape `querySelector` dynamic selector with `CSS.escape()`#2663
0 commit comments