Skip to content

Commit cf9ec2f

Browse files
authored
fix: use logical suffix offset for rtl overflow (#60)
* fix: use logical suffix offset for rtl overflow * test: align responsive suffix assertion
1 parent 6efcec0 commit cf9ec2f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Overflow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,8 @@ function Overflow<ItemType = any>(
318318
if (suffixFixedStart !== null && shouldResponsive) {
319319
suffixStyle = {
320320
position: 'absolute',
321-
left: suffixFixedStart,
322321
top: 0,
322+
insetInlineStart: suffixFixedStart,
323323
};
324324
}
325325

tests/responsive.spec.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,11 @@ describe('Overflow.Responsive', () => {
186186
wrapper.initSize(100, 20);
187187

188188
expect(wrapper.findSuffix().props().style).toEqual(
189-
expect.objectContaining({ position: 'absolute', top: 0, left: 80 }),
189+
expect.objectContaining({
190+
position: 'absolute',
191+
top: 0,
192+
insetInlineStart: 80,
193+
}),
190194
);
191195
});
192196

0 commit comments

Comments
 (0)