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

react-bsonschema-form

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-bsonschema-form - npm Package Compare versions

Comparing version 0.41.7 to 0.41.8

29

lib/components/fields/ObjectIdField.js

@@ -44,26 +44,31 @@ "use strict";

function ObjectIdField(props) {
function ObjectIdField() {
_classCallCheck(this, ObjectIdField);
var _this = _possibleConstructorReturn(this, (ObjectIdField.__proto__ || Object.getPrototypeOf(ObjectIdField)).call(this, props));
_this.state = {
objectID: props.formData || createObjectID()
};
return _this;
return _possibleConstructorReturn(this, (ObjectIdField.__proto__ || Object.getPrototypeOf(ObjectIdField)).apply(this, arguments));
}
_createClass(ObjectIdField, [{
key: "updateObjectID",
value: function updateObjectID(formData) {
if (!formData) {
this.props.onChange(createObjectID());
}
}
}, {
key: "componentWillMount",
value: function componentWillMount() {
if (!this.props.formData) {
this.props.onChange(this.state.objectID);
}
this.updateObjectID(this.props.formData);
}
}, {
key: "componentWillReceiveProps",
value: function componentWillReceiveProps(nextProps) {
this.updateObjectID(nextProps.formData);
}
}, {
key: "render",
value: function render() {
var objectID = this.state.objectID;
var formData = this.props.formData;
var formData = objectID._str || objectID.toString();
var formDataStr = formData && (formData._str || formData.toString());
return _react2.default.createElement(_StringField2.default, _extends({}, this.props, {

@@ -70,0 +75,0 @@ formData: formData,

{
"name": "react-bsonschema-form",
"version": "0.41.7",
"version": "0.41.8",
"description": "A simple React component capable of building HTML forms out of a JSON schema.",

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

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