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

[ASK] Disable position of disabled sortable item #20

Open
alkunjo opened this issue Dec 20, 2017 · 0 comments
Open

[ASK] Disable position of disabled sortable item #20

alkunjo opened this issue Dec 20, 2017 · 0 comments

Comments

@alkunjo
Copy link

alkunjo commented Dec 20, 2017

Can we disable the position of disabled sortable item using this component? For example I have this snippet:

<sortable-list sortable=".mcItem" id="mcList" on-items-changed="itemsOrder">
  <paper-item class="mcItem" value="[[dataMcTrendCross.rows.0.id]]" disabled="true">
    <div class="col m10">[[dataMcTrendCross.rows.0.MenuCategory.name]]</div>
  </paper-item>
  <template is="dom-repeat" items="[[dataMc.rows]]" as="mc">
    <paper-item class="mcItem" value="[[mc.id]]">
      <div class="col m10">[[mc.MenuCategory.name]]</div>
      <div class="col m2">
        <paper-icon-button icon="delete" id="[[mc.id]]" on-click="deleteMc" value="[[mc.id]]"></paper-icon-button>
      </div>
    </paper-item>
  </template>
  <paper-item class="mcItem" value="[[dataMcTrendCross.rows.1.id]]" disabled="true">
    <div class="col m10">[[dataMcTrendCross.rows.1.MenuCategory.name]]</div>
  </paper-item>
</sortable-list>

On that code, I already disabled the first and the last paper-items so those can't be dragged. But somehow the other paper-items inside the dom-repeat still can be dragged and replace the disabled paper-items position. How would I disable the position of the disabled paper-items so another active paper-items can't replace their position?

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

1 participant