You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to have more than 10 sections (for example 20) and try to select 16 (selectedSection: 16, sections: 20) on slider initialization, I was not able to see the 16 selected sections. After looking at the code, I realized that because on initialization, the selectedSection variable is updated before the sections variable, my change on sections value does not take place and thus selectedSection is capped to 10.
Solution: if you swap the place of initializing sections and selectedSection, everything should work. For reference, swap line 490 with line 491. The problem comes from didSet on line 440.
I don't mind forking the repo and using my own version of the slider, but I really want to benefit from future updates since this is one great project which is made amazingly well. Congratulations :) I would be thankful if you made this simple fix.
The text was updated successfully, but these errors were encountered:
When I try to have more than 10 sections (for example 20) and try to select 16 (selectedSection: 16, sections: 20) on slider initialization, I was not able to see the 16 selected sections. After looking at the code, I realized that because on initialization, the selectedSection variable is updated before the sections variable, my change on sections value does not take place and thus selectedSection is capped to 10.
Solution: if you swap the place of initializing sections and selectedSection, everything should work. For reference, swap line 490 with line 491. The problem comes from didSet on line 440.
I don't mind forking the repo and using my own version of the slider, but I really want to benefit from future updates since this is one great project which is made amazingly well. Congratulations :) I would be thankful if you made this simple fix.
The text was updated successfully, but these errors were encountered: