Select2 dropdown container appears after autofill

Select2 dropdown container appears after autofill

connectedsecurityconnectedsecurity Posts: 4Questions: 2Answers: 0

I have a select2 field in my editor with the multiple attribute set which is populated by an MJOIN. When I use autoFill on the table column that references that field a select dropdown appears in the upper left corner of the page and remains until clicked.

It would appear to be a .select2-container that has been inserted immediately before the closing body tag.

I tried

    table.on( 'autoFill', function () {
        $('.select2-container').remove();
    });

but when I open the edit window the misplaced element re-appears until a select2 input is manually selected after which it returns to normal

Answers

  • Danny.DJ.DeBeerDanny.DJ.DeBeer Posts: 4Questions: 2Answers: 0

    Hi,
    Have you resolved this issue. i have the same thing happening with a very simple select2 dropdown.

    fields: [
    { label: "fSelect2field:", name: "select2Only_fSelect2field" ,type: "select2",
    opts: {
    placeholder: "Select ",
    allowClear: true,
    }
    },
    ]

    I have narrowed it down to when the select2 control is the first field in the editor.

    Tx

This discussion has been closed.