Skip to content

options label #437

@ragsnas

Description

@ragsnas

Hi,

i always get the following error for my multiselects.

Uncaught TypeError: string is not a function
Multiselect.createOptionValue

On line 576/577 it says:

// Support the label attribute on options.
var label = this.options.label(element);

but this.options.label is a string (the label of the multiselect form element).

Shouldn't it be

var label = element.label;

Here's one of my multi select elements. Is there something wrong with them?

<select id="feature_CATEGORY_4_MULTISELECT_4_0" 
    name="feature[CATEGORY_4][MULTISELECT_4_0][]" 
    data-visibility="ALL" 
    data-feature-id="HERD" 
    class="multi-select form-control valid" 
    data-select-all="true" 
    data-label="Herd" 
    multiple="multiple" 
    aria-invalid="false">
        <option value="HERD">Herd</option>
        <option value="2HERD">2-Platten-Herd</option>
        <option value="GASHERD">Gasherd</option>
        [...]
</select>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions