Skip to content

Commit 25dd5d0

Browse files
committed
feature #2541 [Autocomplete] Configurable results (J-Ben87)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Autocomplete] Configurable results | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | Issues | | License | MIT TomSelect accepts by default an array of results, each item containing a "text" and a "value". Therefore this bundle exposes results formatted like so. However one may need to expose additional data such as a "disabled" state to customize TomSelect's rendering. This PR aims to offer this possibility by letting `EntityAutocompleter`s drive the creation of the results array. Commits ------- 44c0e1d7a [Autocomplete] Configurable results
2 parents 92f02f9 + fdff02e commit 25dd5d0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/Functional/Test/InteractsWithLiveComponentsTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@
1818
use Symfony\UX\LiveComponent\Test\InteractsWithLiveComponents;
1919
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\Component2;
2020
use Symfony\UX\LiveComponent\Tests\Fixtures\Factory\CategoryFixtureEntityFactory;
21+
use Zenstruck\Foundry\Test\Factories;
2122
use Zenstruck\Foundry\Test\ResetDatabase;
2223

2324
/**
2425
* @author Kevin Bond <[email protected]>
2526
*/
2627
final class InteractsWithLiveComponentsTest extends KernelTestCase
2728
{
29+
use Factories;
2830
use InteractsWithLiveComponents;
2931
use ResetDatabase;
3032

tests/Unit/Form/ComponentWithFormTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@
1414
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
1515
use Symfony\UX\LiveComponent\Tests\Fixtures\Component\FormComponentWithManyDifferentFieldsType;
1616
use Symfony\UX\LiveComponent\Tests\Fixtures\Factory\CategoryFixtureEntityFactory;
17+
use Zenstruck\Foundry\Test\Factories;
1718
use Zenstruck\Foundry\Test\ResetDatabase;
1819

1920
/**
2021
* @author Jakub Caban <[email protected]>
2122
*/
2223
class ComponentWithFormTest extends KernelTestCase
2324
{
25+
use Factories;
2426
use ResetDatabase;
2527

2628
public function testFormValues(): void

0 commit comments

Comments
 (0)