@@ -18,6 +18,8 @@ import { cssProperty, dynamicElevationOffsetProperty, elevationProperty, rippleC
1818export * from './cssproperties' ;
1919export { applyMixins } ;
2020
21+ const observableVisualStates = [ 'highlighted' ] ; // States like :disabled are handled elsewhere
22+
2123function createCornerFamily ( cornerFamily : CornerFamily ) : MDCShapeCornerFamily {
2224 switch ( cornerFamily ) {
2325 case CornerFamily . CUT :
@@ -234,6 +236,10 @@ export function getRippleColor(color: string | Color, alpha = 61.5): UIColor {
234236export function overrideViewBase ( ) {
235237 const NSView = require ( '@nativescript/core' ) . View ;
236238 class ViewWithElevationAndRipple extends View {
239+
240+ //TODO: remove as it needs to be added after TS 5.7 change https://github.com/microsoft/TypeScript/pull/59860
241+ [ key : symbol ] : ( ...args : any [ ] ) => any | void ;
242+
237243 @cssProperty elevation : number ;
238244 @cssProperty dynamicElevationOffset : number ;
239245 @cssProperty rippleColor : Color ;
@@ -355,7 +361,7 @@ export function overrideViewBase() {
355361 if ( this . nativeViewProtected instanceof UIControl ) {
356362 this . _elevationStateChangedHandler =
357363 this . _elevationStateChangedHandler ||
358- new ControlStateChangeListener ( this . nativeViewProtected , ( s : string ) => {
364+ new ControlStateChangeListener ( this . nativeViewProtected , observableVisualStates , ( s : string ) => {
359365 this . updateShadowElevation ( s ) ;
360366 } ) ;
361367 this . _elevationStateChangedHandler . start ( ) ;
0 commit comments