Field type plugins related (Select2)

Field type plugins related (Select2)

ktadrowskiktadrowski Posts: 33Questions: 7Answers: 0

Hello,

I am using Datatables + Editor with vue js and node modules.
I have integrated the Select2 plugin.

I used the code from respective plugin pages.
The plugin code works fine but the plugin css is major issue.

Script is attaching classes to the HTML which are not in the plugin css. So when dropdown is active it is seen away from the field which is being edited.

You can see working example here

If you start editing the "All activity code" column, you can see the select2-options opens right at the end.

The options dropdown has classes as : > select2-drop, select2-drop-active
But the plugin css doesn’t have those. Instead it has classes as : > select2-dropdown, .select2-dropdown--below etc.

Is this the known issue?
I needed to apply css to the field to fix the issue, is this correct? or the css is about to be updated?

Thanks in advance.

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 62,522Questions: 1Answers: 10,272 Site admin
    Answer ✓

    I can't say with the minified files, but I wonder if it is a version issue. Certainly, you are currently loading in an old version of Select2:

    https://cdnjs.cloudflare.com/ajax/libs/select2/3.4.1/select2.js
    

    That isn't included in the bundle, while the CSS is, so I'm not sure what is going on there.

    4.0.13 is the current version of Select2: https://cdnjs.com/libraries/select2 .

    Allan

  • ktadrowskiktadrowski Posts: 33Questions: 7Answers: 0

    Thanks Allan for pointing out to the plugin version.
    Updating it to latest one solved the issue.

    I also noticed you've updated the editor library to fetch the secret key from config file. That's going to help a lot in the deployment stuff. Kudos to you!!

Sign In or Register to comment.