Skip to content

Commit 3211703

Browse files
committed
Update migration guide
1 parent ac926aa commit 3211703

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

docs/src/pages/guides/migration-v4/migration-v4.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ yarn add @material-ui/core
4545

4646
## Handling breaking changes
4747

48+
### BottomNavigation
49+
50+
- typescript: The `event` in `onChange` is no longer typed as a `React.ChangeEvent` but `React.SyntheticEvent`.
51+
```diff
52+
-<BottomNavigation onChange={(event: React.ChangEvent<{}>) => {}} />
53+
+<BottomNavigation onChange={(event: React.SyntheticEvent) => {}} />
54+
```
55+
4856
### Divider
4957

5058
- Use border instead of background color. It prevents inconsistent height on scaled screens. For people customizing the color of the border, the change requires changing the override CSS property:
@@ -69,6 +77,14 @@ yarn add @material-ui/core
6977
/>
7078
```
7179

80+
### Slider
81+
82+
- typescript: The `event` in `onChange` is no longer typed as a `React.ChangeEvent` but `React.SyntheticEvent`.
83+
```diff
84+
-<Slider onChange={(event: React.ChangEvent<{}>, value: unknown) => {}} />
85+
+<Slider onChange={(event: React.SyntheticEvent, value: unknown) => {}} />
86+
```
87+
7288
### TablePagination
7389

7490
- The customization of the table pagination's actions labels must be done with the `getItemAriaLabel` prop.
@@ -80,6 +96,14 @@ yarn add @material-ui/core
8096
+ getItemAriaLabel={…}
8197
```
8298

99+
### Tabs
100+
101+
- typescript: The `event` in `onChange` is no longer typed as a `React.ChangeEvent` but `React.SyntheticEvent`.
102+
```diff
103+
-<Tabs onChange={(event: React.ChangEvent<{}>, value: unknown) => {}} />
104+
+<Tabs onChange={(event: React.SyntheticEvent, value: unknown) => {}} />
105+
```
106+
83107
### Typography
84108

85109
- Replace `srOnly` prop support with a style util:
@@ -133,3 +157,9 @@ yarn add @material-ui/core
133157
-</ExpansionPanel>
134158
+</Accordion>
135159
```
160+
161+
- typescript: The `event` in `onChange` is no longer typed as a `React.ChangeEvent` but `React.SyntheticEvent`.
162+
```diff
163+
-<Accordion onChange={(event: React.ChangEvent<{}>, expanded: boolean) => {}} />
164+
+<Accordion onChange={(event: React.SyntheticEvent, expanded: boolean) => {}} />
165+
```

0 commit comments

Comments
 (0)