Skip to content

Conversation

IndraGunawan
Copy link
Contributor

@IndraGunawan IndraGunawan commented Dec 10, 2024

Q A
Bug fix? no
New feature? no
Issues
License MIT

load symfony--ux-autocomplete--autocomplete controller first before other controller make other controllers able access the tomselect instance, this will make autocomplete more extensible

having an custom-tomselect controller

import { Controller } from '@hotwired/stimulus';

export default class extends Controller {
    connect() {
        console.log(this.element.tomselect)
    }
}

and a form field

$builder->add('field', ChoiceType::class, [
            'autocomplete' => true,
            'attr' => [
                'data-controller' => 'custom-tomselect',
            ],
        ]);

in current behavior it will print out undefined, with this change it print tomselect instance

@carsonbot carsonbot added the Status: Needs Review Needs to be reviewed label Dec 10, 2024
@IndraGunawan IndraGunawan changed the title reorder autocomplete data-controller [Autocomplete] reorder autocomplete data-controller Dec 10, 2024
@smnandre smnandre added Autocomplete Status: Waiting feedback Needs feedback from the author and removed Status: Needs Review Needs to be reviewed labels Dec 10, 2024
@IndraGunawan IndraGunawan deleted the reorder-autocomplete-data-controller branch December 11, 2024 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Autocomplete Status: Waiting feedback Needs feedback from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants