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() {
|
render() {
|
||||||
const {
|
const {
|
||||||
value,
|
value,
|
||||||
|
entry,
|
||||||
|
collection,
|
||||||
|
config,
|
||||||
field,
|
field,
|
||||||
fieldsMetaData,
|
fieldsMetaData,
|
||||||
fieldsErrors,
|
fieldsErrors,
|
||||||
@ -217,6 +220,9 @@ class EditorControl extends React.Component {
|
|||||||
${styleStrings.labelActive};
|
${styleStrings.labelActive};
|
||||||
`}
|
`}
|
||||||
controlComponent={widget.control}
|
controlComponent={widget.control}
|
||||||
|
entry={entry}
|
||||||
|
collection={collection}
|
||||||
|
config={config}
|
||||||
field={field}
|
field={field}
|
||||||
uniqueFieldId={this.uniqueFieldId}
|
uniqueFieldId={this.uniqueFieldId}
|
||||||
value={value}
|
value={value}
|
||||||
@ -283,6 +289,7 @@ const mapStateToProps = state => {
|
|||||||
mediaPaths: state.mediaLibrary.get('controlMedia'),
|
mediaPaths: state.mediaLibrary.get('controlMedia'),
|
||||||
isFetching: state.search.get('isFetching'),
|
isFetching: state.search.get('isFetching'),
|
||||||
queryHits: state.search.get('queryHits'),
|
queryHits: state.search.get('queryHits'),
|
||||||
|
config: state.config,
|
||||||
collection,
|
collection,
|
||||||
entry,
|
entry,
|
||||||
isLoadingAsset,
|
isLoadingAsset,
|
||||||
|
@ -219,6 +219,9 @@ export default class Widget extends Component {
|
|||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
controlComponent,
|
controlComponent,
|
||||||
|
entry,
|
||||||
|
collection,
|
||||||
|
config,
|
||||||
field,
|
field,
|
||||||
value,
|
value,
|
||||||
mediaPaths,
|
mediaPaths,
|
||||||
@ -257,6 +260,9 @@ export default class Widget extends Component {
|
|||||||
t,
|
t,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
return React.createElement(controlComponent, {
|
return React.createElement(controlComponent, {
|
||||||
|
entry,
|
||||||
|
collection,
|
||||||
|
config,
|
||||||
field,
|
field,
|
||||||
value,
|
value,
|
||||||
mediaPaths,
|
mediaPaths,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user