Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display wrong option when used with select #128

Open
dozie opened this issue Jan 1, 2018 · 1 comment
Open

display wrong option when used with select #128

dozie opened this issue Jan 1, 2018 · 1 comment

Comments

@dozie
Copy link

dozie commented Jan 1, 2018

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>
@jannis701
Copy link

i confirm this issue in the current version.

and similar to this I can add: if you have radio-buttons in your sv-element, the current selection of the radio-button will vanish in the moment you drop the element (no matter if the order changed). although in the model the correct value of the radio-button ist kept, and if you trigger a redraw of the buttons (e.g. by ng-hide/ng-show -ing the container of the radio-buttons) the selection is back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants