Skip to content

Commit

Permalink
fix(player): slider value attr not updating state
Browse files Browse the repository at this point in the history
  • Loading branch information
mihar-22 committed Nov 14, 2023
1 parent d2e1eeb commit b7164cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/vidstack/src/components/ui/sliders/slider/slider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export class Slider extends Component<SliderProps, SliderState, SliderEvents, Sl
}

protected override onSetup() {
effect(this._watchValue.bind(this));
effect(this._watchMinMax.bind(this));
}

Expand All @@ -63,6 +64,11 @@ export class Slider extends Component<SliderProps, SliderState, SliderEvents, Sl
// Watch
// -------------------------------------------------------------------------------------------

private _watchValue() {
const { value } = this.$props;
this.$state.value.set(value());
}

private _watchMinMax() {
const { min, max } = this.$props;
this.$state.min.set(min());
Expand Down

0 comments on commit b7164cc

Please sign in to comment.