Skip to content

add handler to AutoComplete onUpdateInput #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Taxellool opened this issue Jul 10, 2017 · 1 comment
Closed

add handler to AutoComplete onUpdateInput #164

Taxellool opened this issue Jul 10, 2017 · 1 comment

Comments

@Taxellool
Copy link

I'm trying to fetch my AutoComplete dataSource from an external API.
but passing my event handler to my Field onChange event does not seem to work when dataSourceConfig prop is set. And I have to pass my event to the child component (AutoComplete component).
here is my form component:

<Field
    name="city"
    floatingLabelText="City"
    component={AutoComplete}
    onChange={(event, value)=> {
        this.handleCityInputUpdate(value)
    }}
    fullWidth
    openOnFocus
    filter={(MUIAutoComplete.noFilter)}
    dataSourceConfig={{text: 'label', value: 'value'}}
    dataSource={cities}
/>

Above code does not trigger my handler onChange bucause of the presence of dataSourceConfig(I think). And when I add handleCityInputUpdate to onInputUpdate I get this error.

Warning: Unknown prop `onInputUpdate` on <input> tag. Remove this prop from the element.
@Taxellool
Copy link
Author

#142

@Taxellool Taxellool changed the title add handler to AutoComplete onInputChange prop add handler to AutoComplete onUpdateInput Jul 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant