Skip to content

Commit 495458c

Browse files
author
farfromrefuge
committed
chore: ios build fix
1 parent 0b5ec5c commit 495458c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/core/index.ios.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import { cssProperty, dynamicElevationOffsetProperty, elevationProperty, rippleC
1818
export * from './cssproperties';
1919
export { applyMixins };
2020

21+
const observableVisualStates = ['highlighted']; // States like :disabled are handled elsewhere
22+
2123
function 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 {
234236
export 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

Comments
 (0)