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

Select2 input fields are not working as repeater fields. #51

Closed
AnwerAR opened this issue Feb 24, 2017 · 4 comments
Closed

Select2 input fields are not working as repeater fields. #51

AnwerAR opened this issue Feb 24, 2017 · 4 comments

Comments

@AnwerAR
Copy link

AnwerAR commented Feb 24, 2017

I am using jQuery repeater and select2.js in a project. they both are working fine separately however when i use a select2 dropdown field inside repeater the select2 dropdown field is showing but the dropdown options are not appearing thus jQuery Repeater is not working with select2.js.

it will be great if there's any fix for this issue? Thank you

@DubFriend
Copy link
Owner

The library doesn't support this out of the box but you could probably make it work using the show callback

$('.my-repeater').repeater({
  show: function () {
    // the value of "this" is set to the newly created html element
    setNewElementWithMyCustomBehavior(this)
  }
})

@AnwerAR
Copy link
Author

AnwerAR commented Mar 2, 2017

Thank you for your response. show callback was not enough in my case. I've hooked my function with index callback too.

@AnwerAR
Copy link
Author

AnwerAR commented Mar 2, 2017

is there an option to set min and max repeater rows?

1 similar comment
@sajjadintel
Copy link

is there an option to set min and max repeater rows?

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

3 participants