Skip to content

sm-dropdown on-change function called on scroll #34

@ghost

Description

Hello guys,

First, congratulations on the work you have provided and many thanks for the useful functionality you provide. There is some weird behavior with the on-change function callback.

I have the following usage of the sm-dropdown component:

<sm-dropdown
    autocentrum-select
    ng-if="searchElement.nivel === 0"
    ng-class="{
         'ng-highlighted':
         cautareService.model[category.id][searchElement.id] &&
         cautareService.model[category.id][searchElement.id].length
     }"
    class="fluid multiple search selection"
    model="cautareService.model[category.id][searchElement.id]"
    items="searchElement.valori"
    label="item.valoare"
    value="item"
    on-change="updateChildSearchElementValues(searchElement)"
    default-text="searchElement.nume"
    name="autocomplete-select-{{searchElement.id}}"
    settings="{useLabels: false, message: {count: searchElement.nume + ' - {count} selectate' }}">
</sm-dropdown>```

The on-change callback function is called multiple times when you change the select value (5-6 times) and also, the biggest issue is that it gets called on every scroll event.

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