Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
const {
uischema,
schema,
classNames,
id,
label,
visible,
enabled,
data,
errors
} = this.props;
const options = resolveSchema(
schema,
(uischema as ControlElement).scope.$ref
).enum;
return (
<div hidden="{!visible}">
<select value="{this.state.value" disabled="{!enabled}"> this.handleChange(ev.target.value) }
>
{
[<option value="">]
.concat(
options.map(optionValue => {</option></select></div>
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
};
};
({ schema, uischema, data, path, dispatch }: ControlProps) => {
const controlElement = uischema as ControlElement;
const label = getLabelObject(controlElement);
const resolvedSchema = resolveSchema(schema, controlElement.scope.$ref + '/items');
const className = `control ${(convertToClassName(controlElement.scope.$ref))}`;
return (
<div>
<fieldset>
<legend>
<button> addNewItem(dispatch, path)}
>
+
</button>
<label>
{ label.show ? label.text : '' }
</label></legend></fieldset></div>