Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Slider inside uib-accordion - handles change position when range parameters are changed in another accordion #450

Closed
@rishitells

Description

@rishitells

Steps to reproduce

  1. Create a range slider inside <uib-accordion-group>
  2. Open accordion by clicking the according heading
  3. Click on any of the control points/handles.
  4. The handles change their place (flicker).
    (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:

<uib-accordion close-others="true">
      <uib-accordion-group is-open="isOpen">
        <uib-accordion-heading>
          <a ng-click="refreshSlider()">Range Slider</a>
        </uib-accordion-heading>
        <rzslider rz-slider-model="minRangeSlider.minValue" rz-slider-high="minRangeSlider.maxValue" rz-slider-options="minRangeSlider.options"></rzslider>
      </uib-accordion-group>
    </uib-accordion>
  $scope.refreshSlider = function() {
    $timeout(function() {
      $scope.$broadcast('rzSliderForceRender');
    });
  };

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions