Material-ui: [AutoComplete] onNewRequest does not get triggered

Created on 1 Mar 2016  路  11Comments  路  Source: mui-org/material-ui

Problem Description

On clicking items, onNewRequest does not get triggered. This is the case even on the documentation page. ENTER button seems to be working.

Thanks

Versions

  • Material-UI: 0.15.0-alpha.1
  • React: 0.14.7
  • Browser: Chrome Version 48.0.2564.116 (64-bit)

Most helpful comment

just had this issue, but what fixed it for me was I had forgotten to include:

import injectTapEventPlugin from 'react-tap-event-plugin'; injectTapEventPlugin();

All 11 comments

Also with 0.14.4 and 0.14.0

The examples seem to work on the documentation page: http://www.material-ui.com/#/components/auto-complete for V0.14.4. However, none of them works in V0.15.0-alpha.1.

I'm experiencing it as well in my project but the documentation examples works fine for me. It's very strange because the click handler inside the autocomplete component sometimes gets called and sometimes not, without any reason apparently.

Same. Is there a workaround or fix?

Also for some reason the event is fired immediately.

It currently only works if you use the arrows. Which currently are buggy too. So you press arrow down twice, enter to pick, and then it'll trigger the function.

Is this bug still exist?
I can't reproduce it from the latest version.
@suhail-ansari-apconic

I had the same issue on alpha1, but similar with yongxu, it's no longer reproducible on alpha2

Thanks for the status update.

I'm having this issue in 0.15.1.

The field is inside a Dialog, and it doesn't work when I select an item, none event is fired.

I'm having this issue in 0.15.1 When I click a suggestion from autocomplete I cannot get the event to fire. If I press enter it does work

<AutoComplete hintText="Search for a patient"
              filter={AutoComplete.fuzzyFilter}
              dataSource={names}
              maxSearchResults={5}
              fullWidth={true}
              onUpdateInput={this.autoCompleteUpdate.bind(this)}
              onNewRequest={(s,i)=>{console.log(i)} /* only works when enter is pressed */ } 
/>

just had this issue, but what fixed it for me was I had forgotten to include:

import injectTapEventPlugin from 'react-tap-event-plugin'; injectTapEventPlugin();

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ryanflorence picture ryanflorence  路  3Comments

activatedgeek picture activatedgeek  路  3Comments

mb-copart picture mb-copart  路  3Comments

finaiized picture finaiized  路  3Comments

reflog picture reflog  路  3Comments