Skip to content

multibox is not showing selected entries initial #9

@ChristianSchmidt1981

Description

@ChristianSchmidt1981

I've a select box with some selected entries in the html-code.

than i am init the multi-box with

` const multiSelect = new IconicMultiSelect({
select: selectorString,
customCss: true
});

    multiSelect.init();`

but the initial selected option-tags in the selectbox are not visible.

I could add it with

$(selectorString + " option[selected='selected']").each(function() { const value = this.value; const target = Array.from(multiSelect.domElements.options).find(function (el) { return el.dataset.value === value; }); multiSelect._handleOption( target, false); })

for making initial entries are visible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions