Autocomplete stopped working with MUI classnames after update

I'm using react components from material-ui library (I'm on version 4: https://v4.mui.com). Today I updated webstrom to 2022.3 (not sure from which version but I didn't update for a while) and autocomplete for mui class names stopped working.

I.e.

const useStyles = makeStyles(() => ({
root: {
width: '100%'
}
})

const Component = () => {
const classes = useStyles()
return (
<div className={classes.ro|} />
)
}

Autocomplete doesn't work at caret (indicated with `|` symbol in my example). It doesn't work both in javascript and typescript projects.

Also when I use "Go to declaration" / "Go to implementation" on existing className (i.e. when I "cmd + b" on "classes.root") IDE doesn't switch to corresponding class name declaration in "makeStyles". Instead it opens `Record` declaration from `lib.es5.d.ts`:

type Record<K extends keyof any, T> = {
[P in K]: T;
};

Both issues are very frustrating and make IDE barely usable for me. Is there any way to make it work in 2022.3? If there's no way, do you can you help me to find the latest version with this functionality working? I don't have better option than downgrading. Please let me know.

Thanks.

1
1 comment
Hello!

thanks, reproduced; submitted to developers as https://youtrack.jetbrains.com/issue/WEB-58514/MUI-componeents-props-completion-doesnt-work-when-using-makeStyles-hook, please vote for it to get notified on updates


Best regards,
Lena
0

Please sign in to leave a comment.