Commit 84de066
fix(menu): place submenu on left when no room on right (#22261)
Also fix alignment of menu when on the left. IMO we want the left submenu and
right submenu to appear in mirror positions. According to
https://floating-ui.com/docs/offset a simple setting like this should do that,
regardless of which side the menu appears on:
middleware: [offset({ mainAxis: 6, crossAxis: -6 })],
But for some reason that doesn't work. I needed to adjust the mainAxis
setting depending on whether the menu is to the left or right.
Fixes #22252.
Co-authored-by: Heloise Lui <71858203+heloiselui@users.noreply.github.com>1 parent 7a80035 commit 84de066
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
152 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
153 | 160 | | |
154 | 161 | | |
155 | 162 | | |
| |||
0 commit comments