Download the PHP package hugoseigle/symfony-ux-autocomplete-select-all without Composer
On this page you can find all versions of the php package hugoseigle/symfony-ux-autocomplete-select-all. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hugoseigle/symfony-ux-autocomplete-select-all
More information about hugoseigle/symfony-ux-autocomplete-select-all
Files in hugoseigle/symfony-ux-autocomplete-select-all
Package symfony-ux-autocomplete-select-all
Short Description Select or deselect every option in a Symfony UX Autocomplete field.
License MIT
Homepage https://github.com/HugoSEIGLE/symfony-ux-autocomplete-select-all
Informations about the package symfony-ux-autocomplete-select-all
Symfony UX Autocomplete Select All
A small Symfony UX bundle that adds accessible Select all and Deselect all controls to a multiple Symfony UX Autocomplete field.
It follows the endpoint's pagination, reuses the Tom Select instance managed by Symfony UX and works with both AssetMapper and Webpack Encore.
Features
- Selects results across every remote autocomplete page.
- Supports Symfony UX's
next_pageresponse and the historical 10-item page format. - Keeps controls synchronized when the selection changes.
- Uses Stimulus values and targets for labels, classes and advanced settings.
- Aborts in-flight requests and removes every listener and generated element on
disconnect(). - Does not instantiate or replace Tom Select.
- Supports grouped Symfony UX Autocomplete responses.
Requirements
| Dependency | Supported versions |
|---|---|
| PHP | 8.2, 8.3, 8.4, 8.5 |
| Symfony | 6.4, 7.x, 8.x |
| Symfony UX Autocomplete | 2.17+; 3.x requires PHP 8.4+ |
| Stimulus | 3.2 or later |
| Assets | AssetMapper or Webpack Encore |
Installation
If Symfony Flex does not register third-party bundles in your application, enable it manually:
The package exposes its controller through the standard Symfony UX asset manifest. AssetMapper consumes it directly; Encore installs and resolves the corresponding npm package through the usual Symfony UX workflow.
See the complete installation guide, including manual AssetMapper and Encore setup.
Usage
Place this controller on a wrapper and mark the multiple autocomplete field as
its field target:
The autocomplete endpoint keeps its normal Symfony UX response:
No separate URL is needed: by default, the controller reads the URL value already configured on Symfony UX Autocomplete.
Configuration
| Stimulus value | Type | Default | Purpose |
|---|---|---|---|
url |
string | Autocomplete URL | Overrides the endpoint used by Select all |
selectAllLabel |
string | Select All |
Select button label |
deselectAllLabel |
string | Deselect All |
Clear button label |
selectAllClasses |
string | btn btn-outline-primary btn-sm select-all-button |
Select button classes |
deselectAllClasses |
string | btn btn-outline-danger btn-sm unselect-all-button |
Clear button classes |
controlsClasses |
string | autocomplete-select-all-controls |
Generated controls wrapper classes |
pageSize |
number | 10 |
Legacy pagination fallback size |
maxPages |
number | 1000 |
Pagination loop safety limit |
Buttons use the native hidden attribute, so Bootstrap is optional. Replace the
class values when using another design system.
See examples for custom controls, Symfony Forms and both asset systems.
Demo
The demo/ directory is a complete Symfony 6.4 AssetMapper
application. It installs this bundle from its parent directory with a Composer
path repository.
Then open the URL printed by Symfony CLI.
Contributing
Bug reports and pull requests are welcome. Read CONTRIBUTING.md for the local workflow, quality checks and contribution rules.
Please report vulnerabilities privately as described in SECURITY.md.
Roadmap
- Add optional progress feedback for very large datasets.
- Evaluate an opt-in confirmation threshold before selecting thousands of records.
- Track future Symfony UX Autocomplete pagination changes without relying on private APIs.
Backward compatibility follows semantic versioning. See CHANGELOG.md for release notes.
License
Symfony UX Autocomplete Select All is released under the MIT License.
All versions of symfony-ux-autocomplete-select-all with dependencies
symfony/dependency-injection Version ^6.4|^7.0|^8.0
symfony/http-kernel Version ^6.4|^7.0|^8.0
symfony/stimulus-bundle Version ^2.13|^3.0
symfony/ux-autocomplete Version ^2.17