Datatables select2 editor issue

Datatables select2 editor issue

TarikStoneman6789TarikStoneman6789 Posts: 1Questions: 0Answers: 0

I am using the Metronic bootstrap theme which packages up select2 + a whole other bunch of plugins into a plugins.bundle.js file.

When I try to use inline editor for select2, I get the following error on init
Cannot read properties of null (reading 'trim')
var n = t.getAttribute("class").trim().split(/\s+/);

I am assuming it has something to do with using Metronic theme's packages select2 but posting just in case anyone else has come accross this issue.

Replies

  • allanallan Posts: 63,676Questions: 1Answers: 10,497 Site admin

    Is that error happening inside Select2? Are you able to link to a test case showing the issue?

    Allan

  • romankarkachevromankarkachev Posts: 1Questions: 0Answers: 0

    Если возникает такая ошибка, то правильный html-код будет такой:

    <select class="form-select" **data-control="select2" data-kt-select2="true"** data-placeholder="Select an option">
        <option></option>
        <option value="1">Option 1</option>
        <option value="2">Option 2</option>
    </select>
    
Sign In or Register to comment.