PageSourceSearch

https://www.desaignes.fr/assets/controllers/components/select2_controller-6a6c14ddebf9832e012612a1d8f0a3be.js

js desaignes.fr collected 2026-10-02 23:16:54 UTC 620 bytes, 30 lines download raw bytes

1import {Controller} from '@hotwired/stimulus';
2import $ from 'jquery';
3import select2 from 'select2';
4import 'select2/dist/css/select2.min.css';
5
6export default class Select2 extends Controller {
7    static values = {
8        options: Object
9    }
10
11    initialize() {
12        // hack to boot select2 plugin with good instance of jquery
13        select2($);
14    }
15
16    connect() {
17        $(this.element).select2({
18            ...this.defaultOptions,
19            ...this.optionsValue,
20        });
21    }
22
23    disconnect() {
24        $(this.element).select2('destroy');
25    }
26
27    defaultOptions() {
28        return {}
29    }
30}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.