Skip to content

Custom Attributes applied to wrong elements when searching #117

@Nick-Pyze

Description

@Nick-Pyze

Using v2.8.3 from npm. Using a basic-select works functionally in all the ways that i need, except that when searching the custom attribute is being applied in the order of the whole options array, not the subset from searching.

eg: i have an app selector, and the platform icon display properly, however when searching, the top element ALWAYS has the icon from the first element in the complete array, not the searched subset

in my example the first app is a html5 webapp, and i search for an android app by name, but it has the html5 icon.

heres my basic select code
<basic-select :customAttr="customAppAttributeFunc" :options="apps" :selected-option="selectedApp" @select="selectApp" placeholder="Select an App" > </basic-select>

and here's the custom app attribute function. the value for each option is a complex object with a platform attribute that is a string

customAppAttributeFunc (item) { if (item.value && item.value.platform) { return item.value.platform } return '' }

Screen Shot 2019-04-18 at 2 49 32 PM
Screen Shot 2019-04-18 at 2 48 29 PM

EDIT:::

This also is repeatable on the demo page
Screen Shot 2019-04-18 at 3 22 50 PM
Screen Shot 2019-04-18 at 3 22 54 PM

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