Skip to content

Commit 6c2d541

Browse files
[CST-15589] Updated slider implementation in SearchRangeFilterComponent
1 parent e7f235a commit 6c2d541

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ export class SearchRangeFilterComponent extends SearchFacetFilterComponent imple
9191
*/
9292
range: [number | undefined, number | undefined];
9393

94+
/**
95+
* The range currently selected by the slider
96+
*/
97+
sliderRange: [number | undefined, number | undefined];
98+
9499
/**
95100
* Whether the sider is being controlled by the keyboard.
96101
* Supresses any changes until the key is released.
@@ -145,6 +150,15 @@ export class SearchRangeFilterComponent extends SearchFacetFilterComponent imple
145150
};
146151
}
147152

153+
/**
154+
* Updates the sliderRange property with the current slider range.
155+
* This method is called whenever the slider value changes, but it does not immediately apply the changes.
156+
* @param range - The current range selected by the slider
157+
*/
158+
onSliderChange(range: [number | undefined, number | undefined]): void {
159+
this.sliderRange = range;
160+
}
161+
148162
/**
149163
* Submits new custom range values to the range filter from the widget
150164
*/
@@ -182,5 +196,4 @@ export class SearchRangeFilterComponent extends SearchFacetFilterComponent imple
182196
shouldShowSlider(): boolean {
183197
return isPlatformBrowser(this.platformId);
184198
}
185-
186199
}

0 commit comments

Comments
 (0)