diff --git a/src/createGridComponent.js b/src/createGridComponent.js index 039eede..f71eea2 100644 --- a/src/createGridComponent.js +++ b/src/createGridComponent.js @@ -250,8 +250,10 @@ export default function createGridComponent({ // The scrollbar size should be considered when scrolling an item into view, // to ensure it's fully visible. // But we only need to account for its size when it's actually visible. - const horizontalScrollbarSize = estimatedTotalWidth > width ? scrollbarSize : 0; - const verticalScrollbarSize = estimatedTotalHeight > height ? scrollbarSize : 0; + const horizontalScrollbarSize = + estimatedTotalWidth > width ? scrollbarSize : 0; + const verticalScrollbarSize = + estimatedTotalHeight > height ? scrollbarSize : 0; this.scrollTo({ scrollLeft: getOffsetForColumnAndAlignment( diff --git a/website/src/routes/examples/FixedSizeListRtl.js b/website/src/routes/examples/FixedSizeListRtl.js index eb79071..3a49532 100644 --- a/website/src/routes/examples/FixedSizeListRtl.js +++ b/website/src/routes/examples/FixedSizeListRtl.js @@ -39,7 +39,7 @@ export default function() { itemData="صف" itemSize={35} width={300} - style={{ direction: "rtl" }} + style={{ direction: 'rtl' }} > {Item} @@ -61,7 +61,7 @@ export default function() { itemData="عمود" itemSize={100} width={300} - style={{ direction: "rtl" }} + style={{ direction: 'rtl' }} > {Item}