heimrichhannot / contao-no-ui-slider-bundle
Extension for heimrichhannot/contao-filter-bundle that extends choice field with range appearance
Installs: 209
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:contao-bundle
Requires
- php: ^7.4 || ^8.0
- contao/core-bundle: ^4.9
- heimrichhannot/contao-encore-contracts: ^1.0
- heimrichhannot/contao-utils-bundle: ^2.97
- symfony/translation-contracts: ^1.0 || ^2.0 || ^3.0
README
This bundle offers support for the JavaScript library noUiSlider for the Contao CMS.
Features
- Filter Bundle support
- Encore Contracts support
Setup
- Install via composer:
composer require heimrichhannot/contao-no-ui-slider-bundle
. - Update Database.
Configuration
Activate NoUiSlider for a "choice filter"
- Create a choice field as usual in heimrichhannot/contao-filter-bundle.
- Activate the option "Add noUiSlider support".
Activate NoUiSlider for a "multiple range filter"
- Create 2 text filter elements which represent the two borders of the filter interval. It's important that the filter element type is text.
- Create a multiple range filter element and link the text filters created in the step before.
- Activate the option "Add noUiSlider support".
Developers
When you change the set value of the slider it matches the current value to the corresponding input field. To set the slider to its min value means that all input fields are unchecked.
In that case no change or click event is triggered. Therefore, the custom event filterAsyncSubmit
is dispatched in this situation.
Use this event to initiate the async submit.