SirGaga / mobiscroll

Automatically exported from code.google.com/p/mobiscroll
0 stars 0 forks source link

First selected value does not work correctly #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a scroller using a custom wheel (ie. not a date but some other custom 
thing)
2. Click into the scroller and do not scroll at all just push the set button

What is the expected output? What do you see instead?
You should see the first item selected instead you see NaN

What version of the product are you using? On what operating system?
1.5 on Chrome

Original issue reported on code.google.com by jackg...@gmail.com on 22 Sep 2011 at 3:21

GoogleCodeExporter commented 9 years ago
As a workaround you should pass a parseValue function, when initializing the 
custom scroller:

parseValue: function (s) {
  if (s !== '') {
   var d = s.split(' ');
  }
  else {
    var d = [1,1,1]; 
    // Default values, values must be valid wheel values,
    // and the number of values must be equal with number of wheels.
  }
  return d;
}

Original comment by diosla...@gmail.com on 23 Sep 2011 at 3:01

GoogleCodeExporter commented 9 years ago

Original comment by diosla...@gmail.com on 24 Oct 2011 at 9:59

GoogleCodeExporter commented 9 years ago

Original comment by diosla...@gmail.com on 24 Oct 2011 at 10:08