From 05b4a4ec0447546c35d894bb5d44204b81e5cb74 Mon Sep 17 00:00:00 2001 From: Ali Sabzevari Date: Fri, 25 Nov 2016 11:41:51 +0100 Subject: [PATCH] Add dataSourceConfig typings to material-ui/AutoComplete --- material-ui/index.d.ts | 1 + material-ui/material-ui-tests.tsx | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/material-ui/index.d.ts b/material-ui/index.d.ts index c98250fc0b..1f09c90365 100644 --- a/material-ui/index.d.ts +++ b/material-ui/index.d.ts @@ -533,6 +533,7 @@ declare namespace __MaterialUI { animated?: boolean; animation?: React.ComponentClass; dataSource: AutoCompleteDataSource; + dataSourceConfig?: { text: string; value: string; }; disableFocusRipple?: boolean; errorStyle?: React.CSSProperties; errorText?: string; diff --git a/material-ui/material-ui-tests.tsx b/material-ui/material-ui-tests.tsx index d1654cbd9d..b7d99748c2 100644 --- a/material-ui/material-ui-tests.tsx +++ b/material-ui/material-ui-tests.tsx @@ -396,6 +396,11 @@ export class AutoCompleteExampleSimple extends React.Component<{}, {dataSource: }); }; + dataSourceConfig = { + text: 'textKey', + value: 'valueKey', + }; + render() { return (
@@ -414,6 +419,12 @@ export class AutoCompleteExampleSimple extends React.Component<{}, {dataSource: animated: true }} /> +
); }