vue-search-select icon indicating copy to clipboard operation
vue-search-select copied to clipboard

Custom Attributes applied to wrong elements when searching

Open Nick-Pyze opened this issue 6 years ago • 1 comments

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

Nick-Pyze avatar Apr 18 '19 22:04 Nick-Pyze

How to add icon in select option?

consciousnessdev avatar Dec 29 '20 06:12 consciousnessdev