jquery.repeater icon indicating copy to clipboard operation
jquery.repeater copied to clipboard

TypeError: Cannot read property 'set' of undefined

Open bebaps opened this issue 5 years ago • 5 comments

This is a valid issue, but I am posting this more as a heads up for future users of this plugin. There have been many issues already logged for this error, with no real resolution. It seems the author of this plugin is no longer actively maintaining it, so be aware that you will need to pretty much fend for yourself with any issues with this plugin.

Screen Shot 2019-09-06 at 5 13 41 PM

When trying to use the setList method you might run into this issue:

Screen Shot 2019-09-06 at 4 53 49 PM

In any case, if you receive this error as many others have, you will need to check two main things:

  1. jQuery can actually find the element it is to set values for
  2. The elements that you are settings values for are "registered" with this plugin

I say "registered" because this plugin uses its own system to clone the inputs found in the DOM. This list can be found in jquery.input.js, but here's a pic:

Screen Shot 2019-09-06 at 4 54 31 PM

In my code, I had this tel input that was causing the error:

Screen Shot 2019-09-06 at 4 54 08 PM

After a few frustrating hours and basically dissecting this entire plugins source code (hence how I found out how this plugin "registers" the inputs that it will actually work with), I found that simply changing that input from a tel to a text solved the problem

Screen Shot 2019-09-06 at 4 54 15 PM

I hope this saves someone the time and frustration.

bebaps avatar Sep 07 '19 00:09 bebaps

I already frustating, before I found this issue. thank you for saving my life

agengdp avatar Nov 26 '19 03:11 agengdp

Hey @bebaps, thanks for solution. You save my all day and painful head.

orhangazi avatar Apr 06 '20 23:04 orhangazi

Hey @bebaps , thanks for the solution. You save my day as well.

shain-digix avatar Jul 30 '21 02:07 shain-digix

Thank you, @bebaps :)

flavioludi avatar Nov 23 '21 00:11 flavioludi

omg thanks, i would've never been able to find this on my own. you're a lifesaver!!

bisma-im avatar May 05 '24 01:05 bisma-im