Custom settings not applied to select2 options

Created on 3 February 2023, almost 2 years ago

Problem/Motivation

For a custom project we need to change a few settings for the select2 component, but a bug in select2.js prevents this.

Steps to reproduce

We have added a preRender callback after the one select2_all adds, so we can add more settings to the select2 array. But these are not applied.

The problem seems that these setting are not populated in the select2 behavior, so they are lost.

Proposed resolution

Fix the code in select2 behavior so it populates the component options from those coming from drupalSettings.

🐛 Bug report
Status

Needs review

Version

1.2

Component

Code

Created by

🇪🇸Spain markus_petrux

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024