Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-jsonschema-form

Package Overview
Dependencies
Maintainers
5
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-jsonschema-form - npm Package Compare versions

Comparing version 0.17.1 to 0.18.0

9

lib/components/fields/BooleanField.js

@@ -21,2 +21,9 @@ "use strict";

function buildOptions(schema) {
return (0, _utils.optionsList)(Object.assign({
enumNames: ["true", "false"],
"enum": [true, false]
}, { enumNames: schema.enumNames }));
}
function BooleanField(props) {

@@ -45,3 +52,3 @@ var schema = props.schema;

var Widget = (0, _utils.getAlternativeWidget)(schema.type, widget, widgets);
return _react2["default"].createElement(Widget, _extends({ options: (0, _utils.optionsList)({ "enum": [true, false] }) }, commonProps));
return _react2["default"].createElement(Widget, _extends({ options: buildOptions(schema) }, commonProps));
}

@@ -48,0 +55,0 @@ return _react2["default"].createElement(_widgetsCheckboxWidget2["default"], commonProps);

2

package.json
{
"name": "react-jsonschema-form",
"version": "0.17.1",
"version": "0.18.0",
"description": "A simple React component capable of building HTML forms out of a JSON schema.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -168,2 +168,4 @@ react-jsonschema-form

> Note: To set the labels for a boolean field, instead of using `true` and `false` you can set `enumNames` in your schema. Note that `enumNames` belongs in your `schema`, not the `uiSchema`, and the order is always `[true, false]`.
#### For `string` fields

@@ -170,0 +172,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc