mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Add dataSourceConfig typings to material-ui/AutoComplete
This commit is contained in:
Vendored
+1
@@ -533,6 +533,7 @@ declare namespace __MaterialUI {
|
||||
animated?: boolean;
|
||||
animation?: React.ComponentClass<Popover.PopoverAnimationProps>;
|
||||
dataSource: AutoCompleteDataSource;
|
||||
dataSourceConfig?: { text: string; value: string; };
|
||||
disableFocusRipple?: boolean;
|
||||
errorStyle?: React.CSSProperties;
|
||||
errorText?: string;
|
||||
|
||||
@@ -396,6 +396,11 @@ export class AutoCompleteExampleSimple extends React.Component<{}, {dataSource:
|
||||
});
|
||||
};
|
||||
|
||||
dataSourceConfig = {
|
||||
text: 'textKey',
|
||||
value: 'valueKey',
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
@@ -414,6 +419,12 @@ export class AutoCompleteExampleSimple extends React.Component<{}, {dataSource:
|
||||
animated: true
|
||||
}}
|
||||
/>
|
||||
<AutoComplete
|
||||
hintText="Type anything"
|
||||
dataSource={this.state.dataSource}
|
||||
dataSourceConfig={this.dataSourceConfig}
|
||||
onUpdateInput={this.handleUpdateInput}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user