Skip to content

Commit

Permalink
fix: add check for rtl-ltr for direction prop (#904)
Browse files Browse the repository at this point in the history
  • Loading branch information
Caele committed Aug 31, 2022
1 parent 8f716d6 commit f5d9e83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apis/nucleus/src/components/listbox/ListBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ export default function ListBox({
local.current.listRef = ref;
return (
<StyledFixedSizeList
direction={direction}
// explicitly set this as it accepts horizontal as well, leading to confusion
direction={direction === 'rtl' ? 'rtl' : 'ltr'}
data-testid="fixed-size-list"
useIsScrolling
height={listHeight}
Expand Down

0 comments on commit f5d9e83

Please sign in to comment.