Material-ui: [Autocomplete] Autocomplete events bubble up to Tabs controller, causing tab content to disappear

Created on 5 May 2016  路  4Comments  路  Source: mui-org/material-ui

Problem Description

This seemed to be fixed for the TextField here - https://github.com/callemall/material-ui/issues/2189 - but I am unsure of how to stop propagation on the autocomplete. Any help is appreciated!

Versions

Material-UI: 0.14.4
React: 0.14.7
Browser: Chrome

bug 馃悰 Autocomplete

Most helpful comment

It seems to be possible to hack around this issue by extending AutoComplete component and overriding it's handleChange function:

class MyAutoComplete extends AutoComplete {
    constructor() {
        super();
        const originalHandleChange = this.handleChange;
        this.handleChange = (event) => {
            event.stopPropagation();
            originalHandleChange(event);
        };
    }
}

However this is probably not a good solution.

All 4 comments

same issue here, did you find any solution to fix it ?? @BinaryWasteland

It seems to be possible to hack around this issue by extending AutoComplete component and overriding it's handleChange function:

class MyAutoComplete extends AutoComplete {
    constructor() {
        super();
        const originalHandleChange = this.handleChange;
        this.handleChange = (event) => {
            event.stopPropagation();
            originalHandleChange(event);
        };
    }
}

However this is probably not a good solution.

had the same problem with radio buttons nested inside tabs.

5219 should address that issue too. Feel free to provide a reproduction case if not.

Was this page helpful?
0 / 5 - 0 ratings