Skip to content

Commit 1640fff

Browse files
committed
feat: Auto switch popup placement
1 parent 302c016 commit 1640fff

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/PickerTrigger.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@ const BUILT_IN_PLACEMENTS = {
77
points: ['tl', 'bl'],
88
offset: [0, 4],
99
overflow: {
10-
adjustX: 0,
10+
adjustX: 1,
11+
adjustY: 1,
12+
},
13+
},
14+
bottomRight: {
15+
points: ['tr', 'br'],
16+
offset: [0, 4],
17+
overflow: {
18+
adjustX: 1,
1119
adjustY: 1,
1220
},
1321
},
@@ -19,6 +27,14 @@ const BUILT_IN_PLACEMENTS = {
1927
adjustY: 1,
2028
},
2129
},
30+
topRight: {
31+
points: ['br', 'tr'],
32+
offset: [0, -4],
33+
overflow: {
34+
adjustX: 0,
35+
adjustY: 1,
36+
},
37+
},
2238
};
2339

2440
export interface PickerTriggerProps {

0 commit comments

Comments
 (0)