Skip to content

display wrong option when used with select  #128

@dozie

Description

@dozie

I have some items which contains some select options in them. When moving the row, the items in the select input field always resets to the first option until the element has been moved to its new spot.

Here's a piece of what I have

<ul class="session-table" sv-root sv-part="columns" sv-on-sort="sort($item, $partFrom, $partTo, $indexFrom, $indexTo)"
     sv-on-start="start($item, $part, $index, $helper)">
    <li class="list-grid" ng-repeat="(index, col) in columns" sv-element>
        <div class="session-row">
            <div class="session-rowcontent">
                <span class="session-grid-dots" sv-handle></span>
                <input type="text" class="ffl-session-value ffl-text" value=""
                    ng-model="col.label"
                    ng-class="{'text-empty': !col.label, 'text-not-empty': col.label}"/>

                <select class="preview-select dropdown"
                    ng-model="col.field"
                    ng-class='{"dropdown-empty": !col.field, "dropdown": col.field, "col-field-error": col.error}'>
                        <option ng-repeat="field in fields" value="{{field}}">{{field}}</option>
                </select>
            </div>
        </div>
    </li>
</ul>

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