mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 02:59:58 +08:00
fix typescript errors
This commit is contained in:
parent
15d3070275
commit
9b9c4c7dec
@ -38,7 +38,7 @@ export interface CheckboxChangeEvent {
|
||||
nativeEvent: MouseEvent;
|
||||
}
|
||||
|
||||
export default class Checkbox extends React.Component<CheckboxProps, {}> {
|
||||
export default class Checkbox extends React.Component<CheckboxProps, {}, {}> {
|
||||
static Group: typeof CheckboxGroup;
|
||||
static defaultProps = {
|
||||
prefixCls: 'ant-checkbox',
|
||||
@ -49,6 +49,8 @@ export default class Checkbox extends React.Component<CheckboxProps, {}> {
|
||||
checkboxGroup: PropTypes.any,
|
||||
};
|
||||
|
||||
context: any;
|
||||
|
||||
private rcCheckbox: any;
|
||||
|
||||
shouldComponentUpdate(nextProps: CheckboxProps, nextState: {}, nextContext: CheckboxGroupContext) {
|
||||
|
@ -100,6 +100,8 @@ class Sider extends React.Component<SiderProps, SiderState> {
|
||||
return null;
|
||||
}
|
||||
|
||||
context: any;
|
||||
|
||||
private mql: MediaQueryList;
|
||||
private uniqueId: string;
|
||||
|
||||
|
@ -74,6 +74,8 @@ export default class Item extends React.Component<ListItemProps, any> {
|
||||
grid: PropTypes.any,
|
||||
};
|
||||
|
||||
context: any;
|
||||
|
||||
render() {
|
||||
const { grid } = this.context;
|
||||
const { prefixCls = 'ant-list', children, actions, extra, className, ...others } = this.props;
|
||||
|
@ -8,6 +8,7 @@ class MenuItem extends React.Component<any, any> {
|
||||
inlineCollapsed: PropTypes.bool,
|
||||
};
|
||||
static isMenuItem = 1;
|
||||
context: any;
|
||||
private menuItem: any;
|
||||
onKeyDown = (e: React.MouseEvent<HTMLElement>) => {
|
||||
this.menuItem.onKeyDown(e);
|
||||
|
@ -9,6 +9,7 @@ class SubMenu extends React.Component<any, any> {
|
||||
};
|
||||
// fix issue:https://github.com/ant-design/ant-design/issues/8666
|
||||
static isSubMenu = 1;
|
||||
context: any;
|
||||
private subMenu: any;
|
||||
onKeyDown = (e: React.MouseEvent<HTMLElement>) => {
|
||||
this.subMenu.onKeyDown(e);
|
||||
|
@ -77,6 +77,7 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
|
||||
siderCollapsed: PropTypes.bool,
|
||||
collapsedWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
||||
};
|
||||
context: any;
|
||||
switchingModeFromInline: boolean;
|
||||
inlineOpenKeys: string[] = [];
|
||||
constructor(props: MenuProps) {
|
||||
|
@ -20,6 +20,8 @@ export default class Radio extends React.Component<RadioProps, {}> {
|
||||
radioGroup: PropTypes.any,
|
||||
};
|
||||
|
||||
context: any;
|
||||
|
||||
private rcCheckbox: any;
|
||||
|
||||
shouldComponentUpdate(nextProps: RadioProps, nextState: {}, nextContext: RadioGroupContext) {
|
||||
|
@ -15,6 +15,8 @@ export default class RadioButton extends React.Component<RadioButtonProps, any>
|
||||
radioGroup: PropTypes.any,
|
||||
};
|
||||
|
||||
context: any;
|
||||
|
||||
render() {
|
||||
const radioProps: RadioButtonProps = { ...this.props };
|
||||
if (this.context.radioGroup) {
|
||||
|
Loading…
Reference in New Issue
Block a user