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

Question: flagging items to prevent deletion? #39

Closed
flashadvocate opened this issue Nov 24, 2016 · 1 comment
Closed

Question: flagging items to prevent deletion? #39

flashadvocate opened this issue Nov 24, 2016 · 1 comment

Comments

@flashadvocate
Copy link

Just wondering if there's a mechanism in place for hiding the delete button for items containing a specific class or data value. I have a use case which includes several items that need to persist in addition to any extra values a user might want to add.

I can dig through the library to answer this question, but on the off chance that you save me the time of looking, or doing something custom myself. :)

@DubFriend
Copy link
Owner

yea nothing like this, but the custom "show" callback might be a decent place to hook something up

$('.my-repeater').repeater({
  show: function () {
    if(shouldBeHidden(this)) {
      $(this).find('[data-repeater-delete]').hide();
    }
    $(this).show();
  }
})

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