Skip to content

Commit 712a860

Browse files
committed
fix(slider): ios background color not working
1 parent 3aa93f0 commit 712a860

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/slider/slider.ios.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { elevationProperty, rippleColorProperty, themer } from '@nativescript-community/ui-material-core';
2-
import { Color, colorProperty } from '@nativescript/core';
2+
import { backgroundColorProperty, Color, colorProperty } from '@nativescript/core';
33
import { thumbColorProperty, thumbHollowAtStartProperty, trackBackgroundColorProperty, trackFillColorProperty } from './cssproperties';
44
import { SliderBase } from './slider-common';
55

@@ -44,6 +44,9 @@ export class Slider extends SliderBase {
4444
this.rippleColor = color;
4545
}
4646
}
47+
[backgroundColorProperty.setNative](value) {
48+
this[trackBackgroundColorProperty.setNative](value);
49+
}
4750
[trackBackgroundColorProperty.setNative](color: Color) {
4851
this.nativeViewProtected.setTrackBackgroundColorForState(color ? color.ios : null, UIControlState.Normal);
4952
}

0 commit comments

Comments
 (0)