Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const mapStateToProps = (state, ownProps) => {
const path = compose(ownProps.path, toDataPathSegments(ownProps.uischema.scope.$ref).join('.'));
const visible = _.has(ownProps, 'visible') ? ownProps.visible : isVisible(ownProps, state);
const enabled = _.has(ownProps, 'enabled') ? ownProps.enabled : isEnabled(ownProps, state);
return {
rootData: getData(state),
data: resolveData(getData(state), path),
uischema: ownProps.uischema,
schema: ownProps.schema,
resolvedSchema: resolveSchema(ownProps.schema, ownProps.uischema.scope.$ref),
path,
visible,
enabled
};
};
const mapStateToProps = (state, ownProps) => {
const path = composeWithUi(ownProps.uischema, ownProps.path);
return {
data: resolveData(getData(state), path),
uischema: ownProps.uischema,
schema: ownProps.schema,
path
};
};
const mapStateToProps = (state, ownProps) => {
const path = compose(ownProps.path, toDataPathSegments(ownProps.uischema.scope.$ref).join('.'));
const visible = _.has(ownProps, 'visible') ? ownProps.visible : isVisible(ownProps, state);
const enabled = _.has(ownProps, 'enabled') ? ownProps.enabled : isEnabled(ownProps, state);
return {
rootData: getData(state),
data: resolveData(getData(state), path),
uischema: ownProps.uischema,
schema: ownProps.schema,
resolvedSchema: resolveSchema(ownProps.schema, ownProps.uischema.scope.$ref),
path,
visible,
enabled
};
};