Skip to content

Commit

Permalink
when <RowDefinition> children contains <ColumnDefinition> and an arra…
Browse files Browse the repository at this point in the history
…y of <ColumnDefinition>
  • Loading branch information
JaosnHsieh committed Oct 14, 2018
1 parent fc77b31 commit 4a8bfed
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/utils/columnUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ export function getColumnProperties(rowProperties, allColumns=[]) {
// build one object that contains all of the column properties keyed by id
children.reduce((previous, current, i) => {
if (current) {
previous[current.props.id] = {order: offset + i, ...current.props};
if(Array.isArray(current)){
current.forEach((c)=>{
previous[c.props.id] = {order: offset + i, ...c.props};
});
}else{
previous[current.props.id] = {order: offset + i, ...current.props};
}

}
return previous;
}, columnProperties);
Expand Down

0 comments on commit 4a8bfed

Please sign in to comment.