Skip to content

Commit

Permalink
Add support for metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
avoinea committed Oct 7, 2020
1 parent c87710a commit 8267b27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/ColumnsBlock/ColumnsBlockEdit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ class ColumnsBlockEdit extends React.Component {
index,
} = this.props;

const metadata = this.props.metadata || this.props.properties;
const { coldata, gridCols, gridSize } = data;
const columnList = getColumns(coldata);

Expand Down Expand Up @@ -188,6 +189,7 @@ class ColumnsBlockEdit extends React.Component {
<div className="column-header"></div>
<BlocksForm
key={colId}
metadata={metadata}
properties={isEmpty(column) ? emptyBlocksForm() : column}
selectedBlock={
selected ? this.state.colSelections[colId] : null
Expand Down
3 changes: 2 additions & 1 deletion src/ColumnsBlock/ColumnsBlockView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const ColumnsBlockView = (props) => {
gridCols = [],
block_title,
} = props.data;
const metadata = props.metadata || props.properties;
const columnList = getColumns(coldata);
return (
<div className="columns-view">
Expand All @@ -29,7 +30,7 @@ const ColumnsBlockView = (props) => {
style={getStyle(column.settings || {})}
>
{/* <h4>{`Column ${index}`}</h4> */}
<RenderBlocks {...props} content={column} />
<RenderBlocks {...props} metadata={metadata} content={column} />
</Grid.Column>
);
})}
Expand Down

0 comments on commit 8267b27

Please sign in to comment.