feat: add entry, collection and config prop to control widget (#3672)
This commit is contained in:
parent
2580251208
commit
3e5ff71846
@ -126,6 +126,9 @@ class EditorControl extends React.Component {
|
||||
render() {
|
||||
const {
|
||||
value,
|
||||
entry,
|
||||
collection,
|
||||
config,
|
||||
field,
|
||||
fieldsMetaData,
|
||||
fieldsErrors,
|
||||
@ -217,6 +220,9 @@ class EditorControl extends React.Component {
|
||||
${styleStrings.labelActive};
|
||||
`}
|
||||
controlComponent={widget.control}
|
||||
entry={entry}
|
||||
collection={collection}
|
||||
config={config}
|
||||
field={field}
|
||||
uniqueFieldId={this.uniqueFieldId}
|
||||
value={value}
|
||||
@ -283,6 +289,7 @@ const mapStateToProps = state => {
|
||||
mediaPaths: state.mediaLibrary.get('controlMedia'),
|
||||
isFetching: state.search.get('isFetching'),
|
||||
queryHits: state.search.get('queryHits'),
|
||||
config: state.config,
|
||||
collection,
|
||||
entry,
|
||||
isLoadingAsset,
|
||||
|
@ -219,6 +219,9 @@ export default class Widget extends Component {
|
||||
render() {
|
||||
const {
|
||||
controlComponent,
|
||||
entry,
|
||||
collection,
|
||||
config,
|
||||
field,
|
||||
value,
|
||||
mediaPaths,
|
||||
@ -257,6 +260,9 @@ export default class Widget extends Component {
|
||||
t,
|
||||
} = this.props;
|
||||
return React.createElement(controlComponent, {
|
||||
entry,
|
||||
collection,
|
||||
config,
|
||||
field,
|
||||
value,
|
||||
mediaPaths,
|
||||
|
Loading…
x
Reference in New Issue
Block a user