Skip to content

Commit

Permalink
add navRoot & contentType props to BlockDataForm (#43)
Browse files Browse the repository at this point in the history
* add navRoot & contentType props to BlockDataForm

* changelog entry

* lint
  • Loading branch information
danalvrz authored Jan 30, 2024
1 parent c278f97 commit 3f063ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/43.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Make navRoot and contentType props available to BlockDataForm @danalvrz
5 changes: 4 additions & 1 deletion src/components/Data.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { BlockDataForm } from '@plone/volto/components';
import { SliderSchema } from './schema';

const SliderData = (props) => {
const { block, blocksConfig, data, onChangeBlock } = props;
const { block, blocksConfig, data, onChangeBlock, navRoot, contentType } =
props;
const intl = useIntl();
const schema = SliderSchema({ ...props, intl });

Expand All @@ -26,6 +27,8 @@ const SliderData = (props) => {
onChangeBlock={onChangeBlock}
formData={data}
block={block}
navRoot={navRoot}
contentType={contentType}
/>
);
};
Expand Down

0 comments on commit 3f063ae

Please sign in to comment.