-
-
Notifications
You must be signed in to change notification settings - Fork 497
Slider inside uib-accordion - handles change position when range parameters are changed in another accordion #450
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
Comments
What browser are you using? I'm seeing a working fine demo on Chrome. |
@ValentinH This is really strange. I opened the fiddle again and there is no flickering now. Used chrome only :| Though I also have one more issue, which is related to re-rendering of slider when the floor/ceil values are changed (new values retrieved asynchronously from server). I tried to reproduce this issue using $interval to change floor and ceil values. As soon as floor/ceil values are changed, both the slider handles overlap and stick to corner of the slider. To reproduce, open the accordion and wait for a few seconds. Don't know whether I should ask this question here or open a new issue. |
I don't know if it's the reason, but in your example you set twice the floor and I think that you want to change the ceil on line 13. |
Oh, I am really sorry for the glitch. I changed the line to change <uib-accordion-group ng-repeat="element in elements">
<rzslider rz-slider-model="element.minVolume" rz-slider-high="element.maxVolume" rz-slider-floor="element.minVolume" rz-slider-ceil="element.maxVolume"></rzslider>
</uib-accordion-group> The first time it displays file, but as soon as the values change, the slider becomes dysfunctional. Trying to fix it since morning. Will try to reproduce in fiddle. |
<uib-accordion-group ng-repeat="element in elements">
<rzslider rz-slider-model="element.minVolume" rz-slider-high="element.maxVolume"
rz-slider-options="{floor: element.minVolume, ceil: element.maxVolume}"></rzslider>
</uib-accordion-group> |
Also tried to do that, but no success. I will try to reproduce it. Thanks a lot for the help. |
The cleanest way would be to have the options definition in each element like so: <uib-accordion-group ng-repeat="element in elements">
<rzslider rz-slider-model="element.minVolume" rz-slider-high="element.maxVolume"
rz-slider-options="element.options"></rzslider>
</uib-accordion-group> |
Sure, will try that! :) |
@ValentinH I think I finally reproduced the issue in fiddle. The problem roughly seems to be that when there are two (or more) accordion groups, one of which contains slider, and user changes the slider ranges (min, max, floor and ceil) from the other accordion group than the slider one, then, when user opens slider accordion, the slider handles overlap each other and stick to left of the slider bar. I also observed some other problems with slider handle positions when I changed parameters. Below are the steps to reproduce:
The real scenario here is that user can change something in filter in accordion, and a new server request goes and fetches new data (and new slider ranges based on new data). The slider should be re-generated using the new data. |
I fix it by calling your Also, you switched min and max so i changed it. A note for myself, in some case, when the slider is shown, the max and ceil labels are both shown which is the bug referenced in #396. It might also be related to #446. |
Thank you so much! This should definitely help. |
This solution is very good. It should be included in the docs. |
Steps to reproduce
<uib-accordion-group>
(I also tried to use
$scope.$$postDigest
instead of$timeout
inside refresh method but that completely makes it dysfunctional).I am using refresh method on the
ng-cllick
event of accordion heading:Demo: https://jsfiddle.net/kh372f1k/
Expected behaviour
The handles should not flicker / change their original place on clicking first time
Actual behaviour
The handles are flickering / changing their original place on clicking first time
The text was updated successfully, but these errors were encountered: