From ff616a14589183bbd16c21686399d2233e52c19b Mon Sep 17 00:00:00 2001 From: Nathan Brown Date: Sat, 15 Aug 2020 22:14:24 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#46334=20[material-?= =?UTF-8?q?ui]=20fix:=20makeSelectable=20omit=20inner=20component's=20onCh?= =?UTF-8?q?ange=20property=20by=20@ngbrown?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [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. --- types/material-ui-datatables/index.d.ts | 2 +- types/material-ui-pagination/index.d.ts | 2 +- types/material-ui/index.d.ts | 4 ++-- types/material-ui/material-ui-tests.tsx | 8 +++++++- types/react-material-ui-form-validator/index.d.ts | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/types/material-ui-datatables/index.d.ts b/types/material-ui-datatables/index.d.ts index ece700fe23..612890b77c 100644 --- a/types/material-ui-datatables/index.d.ts +++ b/types/material-ui-datatables/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/hyojin/material-ui-datatables#readme // Definitions by: Ravi L. // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// Minimum TypeScript Version: 3.5 import * as React from 'react'; diff --git a/types/material-ui-pagination/index.d.ts b/types/material-ui-pagination/index.d.ts index c5f363cc17..8f783bcb08 100644 --- a/types/material-ui-pagination/index.d.ts +++ b/types/material-ui-pagination/index.d.ts @@ -2,7 +2,7 @@ // Project: https://github.com/lo-tp/material-ui-pagination // Definitions by: m0a // 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; diff --git a/types/material-ui/index.d.ts b/types/material-ui/index.d.ts index f8558c4992..af8889e46f 100644 --- a/types/material-ui/index.d.ts +++ b/types/material-ui/index.d.ts @@ -14,7 +14,7 @@ // Sam Walsh // Tim de Koning // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// Minimum TypeScript Version: 3.5 /// /// @@ -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

(component: React.ComponentClass

): React.ComponentClass

; + export function makeSelectable

(component: React.ComponentClass

): React.ComponentClass & SelectableProps>; } namespace Menus { diff --git a/types/material-ui/material-ui-tests.tsx b/types/material-ui/material-ui-tests.tsx index ac32788c4b..6842621ace 100644 --- a/types/material-ui/material-ui-tests.tsx +++ b/types/material-ui/material-ui-tests.tsx @@ -4227,7 +4227,7 @@ function wrapState(ComposedComponent: ComponentClass<__MaterialUI.List.Selectabl }; } -const SelectableList = wrapState(makeSelectable<{}>(List)); +const SelectableList = wrapState(makeSelectable(List)); const ListExampleSelectable = () => ( @@ -4264,6 +4264,12 @@ const ListExampleSelectable = () => ( ); +const DirectSelectableList = makeSelectable(List); + +const DirectSelectableListExample = () => ( + console.log(v)} /> +); + // "http://www.material-ui.com/#/components/menu" const MenuExampleSimple = () => (

diff --git a/types/react-material-ui-form-validator/index.d.ts b/types/react-material-ui-form-validator/index.d.ts index 44d378973f..02a3fc93f6 100644 --- a/types/react-material-ui-form-validator/index.d.ts +++ b/types/react-material-ui-form-validator/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Frank Brullo // J.R // 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';