зеркало из https://github.com/microsoft/reactxp.git
Fixing the crash because of possibility for buttonStyles to be undefined, fixing the inconsistency in onAccessibilityTapIOS definition for Button and View. (#767)
This commit is contained in:
Родитель
d05380fb47
Коммит
93442d0278
|
@ -641,7 +641,7 @@ export interface ViewPropsShared extends CommonProps, CommonAccessibilityProps {
|
||||||
animateChildLeave?: boolean;
|
animateChildLeave?: boolean;
|
||||||
animateChildMove?: boolean;
|
animateChildMove?: boolean;
|
||||||
|
|
||||||
onAccessibilityTapIOS?: Function;
|
onAccessibilityTapIOS?: (e: SyntheticEvent) => void;
|
||||||
onLayout?: (e: ViewOnLayoutEvent) => void;
|
onLayout?: (e: ViewOnLayoutEvent) => void;
|
||||||
onMouseEnter?: (e: MouseEvent) => void;
|
onMouseEnter?: (e: MouseEvent) => void;
|
||||||
onMouseLeave?: (e: MouseEvent) => void;
|
onMouseLeave?: (e: MouseEvent) => void;
|
||||||
|
|
|
@ -185,7 +185,7 @@ export class Button extends ButtonBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default to 'pointer' cursor for enabled buttons unless otherwise specified.
|
// Default to 'pointer' cursor for enabled buttons unless otherwise specified.
|
||||||
if (!buttonStyles.cursor) {
|
if (!buttonStyles || !buttonStyles.cursor) {
|
||||||
buttonStyleMutations.cursor = this.props.disabled ? 'default' : 'pointer';
|
buttonStyleMutations.cursor = this.props.disabled ? 'default' : 'pointer';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче