mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
🤖 Merge PR #46334 [material-ui] fix: makeSelectable omit inner component's onChange property by @ngbrown
* [material-ui] fix: makeSelectable omit inner component's onChange property. * [material-ui-datatables]: update minimum TypeScript version to 3.5. * [material-ui-pagination]: update minimum TypeScript version to 3.5. * [react-material-ui-form-validator]: update minimum TypeScript version to 3.5.
This commit is contained in:
parent
0c793bde20
commit
ff616a1458
2
types/material-ui-datatables/index.d.ts
vendored
2
types/material-ui-datatables/index.d.ts
vendored
@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/hyojin/material-ui-datatables#readme
|
||||
// Definitions by: Ravi L. <https://github.com/coding2012>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
// Minimum TypeScript Version: 3.5
|
||||
|
||||
import * as React from 'react';
|
||||
|
||||
|
||||
2
types/material-ui-pagination/index.d.ts
vendored
2
types/material-ui-pagination/index.d.ts
vendored
@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/lo-tp/material-ui-pagination
|
||||
// Definitions by: m0a <https://m0a.github.io>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
// Minimum TypeScript Version: 3.5
|
||||
import * as React from 'react';
|
||||
export interface PaginationProps {
|
||||
total: number;
|
||||
|
||||
4
types/material-ui/index.d.ts
vendored
4
types/material-ui/index.d.ts
vendored
@ -14,7 +14,7 @@
|
||||
// Sam Walsh <https://github.com/samwalshnz>
|
||||
// Tim de Koning <https://github.com/reggino>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
// Minimum TypeScript Version: 3.5
|
||||
|
||||
/// <reference types="react" />
|
||||
/// <reference types="react-addons-linked-state-mixin" />
|
||||
@ -1192,7 +1192,7 @@ declare namespace __MaterialUI {
|
||||
}
|
||||
|
||||
// union types for higher order components in TypeScript 1.8: https://github.com/Microsoft/TypeScript/issues/4362
|
||||
export function makeSelectable<P extends {}>(component: React.ComponentClass<P>): React.ComponentClass<P & SelectableProps>;
|
||||
export function makeSelectable<P extends {}>(component: React.ComponentClass<P>): React.ComponentClass<Omit<P, 'onChange'> & SelectableProps>;
|
||||
}
|
||||
|
||||
namespace Menus {
|
||||
|
||||
@ -4227,7 +4227,7 @@ function wrapState(ComposedComponent: ComponentClass<__MaterialUI.List.Selectabl
|
||||
};
|
||||
}
|
||||
|
||||
const SelectableList = wrapState(makeSelectable<{}>(List));
|
||||
const SelectableList = wrapState(makeSelectable(List));
|
||||
|
||||
const ListExampleSelectable = () => (
|
||||
<Paper>
|
||||
@ -4264,6 +4264,12 @@ const ListExampleSelectable = () => (
|
||||
</Paper>
|
||||
);
|
||||
|
||||
const DirectSelectableList = makeSelectable(List);
|
||||
|
||||
const DirectSelectableListExample = () => (
|
||||
<DirectSelectableList onChange={(e, v) => console.log(v)} />
|
||||
);
|
||||
|
||||
// "http://www.material-ui.com/#/components/menu"
|
||||
const MenuExampleSimple = () => (
|
||||
<div>
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
// Definitions by: Frank Brullo <https://github.com/FrankBrullo>
|
||||
// J.R <https://github.com/jrguenin>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.1
|
||||
// TypeScript Version: 3.5
|
||||
|
||||
import * as React from 'react';
|
||||
import { SelectFieldProps, TextFieldProps } from 'material-ui';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user