Commit 0a8ce714 by Torkel Ödegaard Committed by GitHub

VizRepeater: fixed issue with resolved auto orientation passed back from VizRepeater (#23767)

* VizRepeater: fixed issue with resolved auto orientation passed back from VizRepeater

* Updated variable name
parent aa7d2c6a
...@@ -145,7 +145,9 @@ export class VizRepeater<V, D = {}> extends PureComponent<Props<V, D>, State<V>> ...@@ -145,7 +145,9 @@ export class VizRepeater<V, D = {}> extends PureComponent<Props<V, D>, State<V>>
let vizHeight = height; let vizHeight = height;
let vizWidth = width; let vizWidth = width;
switch (this.getOrientation()) { let resolvedOrientation = this.getOrientation();
switch (resolvedOrientation) {
case VizOrientation.Horizontal: case VizOrientation.Horizontal:
repeaterStyle.flexDirection = 'column'; repeaterStyle.flexDirection = 'column';
itemStyles.marginBottom = `${itemSpacing}px`; itemStyles.marginBottom = `${itemSpacing}px`;
...@@ -170,7 +172,13 @@ export class VizRepeater<V, D = {}> extends PureComponent<Props<V, D>, State<V>> ...@@ -170,7 +172,13 @@ export class VizRepeater<V, D = {}> extends PureComponent<Props<V, D>, State<V>>
{values.map((value, index) => { {values.map((value, index) => {
return ( return (
<div key={index} style={getItemStylesForIndex(itemStyles, index, values.length)}> <div key={index} style={getItemStylesForIndex(itemStyles, index, values.length)}>
{renderValue({ value, width: vizWidth, height: vizHeight, alignmentFactors, orientation })} {renderValue({
value,
width: vizWidth,
height: vizHeight,
alignmentFactors,
orientation: resolvedOrientation,
})}
</div> </div>
); );
})} })}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment