mattiamanzati / typings-material-ui

Typings from callemall/material-ui project as NPM Module
MIT License
3 stars 2 forks source link

Autocomplete dataSource typings too narrow, dataSourceConfig missing. #20

Closed neopostmodern closed 8 years ago

neopostmodern commented 8 years ago

TypeScript Version: 2.0.2

Typings Version: master

Issue: Autocomplete dataSource typings are too narrow. They ignore the existence of dataSourceConfig (which is missing).

Code:

const countries = [
  { "name": "Afghanistan", "code": "AF" },
  { "name": "Åland Islands", "code": "AX" },
  { "name": "Albania", "code": "AL" }
];
let autocomplete = <AutoComplete floatingLabelText="Search for a country"
                         filter={AutoComplete.fuzzyFilter}
                         dataSource={countries}
                         dataSourceConfig={{ text: 'name', value: 'code' }} />

See the doc.

mattiamanzati commented 8 years ago

Thanks for your awesome feedback!

It should be fixed now, try installing typings install github:mattiamanzati/typings-material-ui and let me know!

Mattia.

neopostmodern commented 8 years ago

Yup, seems to work.