Download the PHP package kreemer/ux-autocomplete-js without Composer
On this page you can find all versions of the php package kreemer/ux-autocomplete-js. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package ux-autocomplete-js
UX autoComplete.js
UX autoComplete.js is a Symfony bundle integrating the autoComplete.js library in Symfony applications. It is part of the Symfony UX initiative.
Installation
UX autoComplete.js requires PHP 7.4+ and Symfony 4.4+.
Install this bundle using Composer and Symfony Flex:
Also make sure you have at least version 2.0 of @symfony/stimulus-bridge in your package.json
file.
Usage
To use this UX Package, inject the AutoCompleteBuilderInterface
service and create an autoComplete model in PHP:
All options and data are provided as-is to autoComplete.js. You can read autoComplete.js documentation to discover them all.
Once created in PHP, a autoComplete model can be displayed using Twig:
Form type
The bundle provides a custom form type which can be used like an EntityType.
The form itself will be rendered automatically with an input box which the entity class can be selected.
Extend the default behavior
The controller allows you to extend its default behavior using a custom Stimulus controller:
Then in your render call, add your controller as an HTML attribute:
This is the preferred method to extend the default functionality. Note that with the preConnect event it is possible to attach handlers and callback functions.
Run tests
PHP tests
JavaScript tests
All versions of ux-autocomplete-js with dependencies
ext-json Version *
symfony/config Version ^4.4.17|^5.0
symfony/dependency-injection Version ^4.4.17|^5.0
symfony/doctrine-bridge Version ^5.3
symfony/form Version ^5.3
symfony/http-kernel Version ^4.4.17|^5.0