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

react-formalize

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-formalize - npm Package Compare versions

Comparing version 0.3.0-alpha3 to 0.3.0-alpha4

32

lib/components/inputs/Select.js

@@ -37,10 +37,2 @@ 'use strict';

enumerable: true
}, {
key: 'defaultProps',
value: {
// Set empty string as default value
// This will show up the placeholder option, when no value is set.
value: ''
},
enumerable: true
}]);

@@ -74,8 +66,6 @@

Select.prototype.renderOptions = function renderOptions(options, placeholder) {
Select.prototype.renderOptions = function renderOptions(options, multiple, placeholder) {
var children = [];
if (placeholder) {
// Placeholder implementation from stack overflow
// See: http://stackoverflow.com/a/8442831/1818705
if (!multiple && placeholder) {
children.push(_react2['default'].createElement(

@@ -86,4 +76,3 @@ 'option',

value: "",
disabled: true,
style: { display: 'none' } },
disabled: true },
placeholder

@@ -110,9 +99,20 @@ ));

var options = _props.options;
var multiple = _props.multiple;
var placeholder = _props.placeholder;
var children = _props.children;
var value = props.value;
var restProps = _objectWithoutProperties(props, ['value']);
var finalValue = value;
if (placeholder && !value) {
// Set empty string as default value.
// This will show up the placeholder option, when no value is set.
finalValue = '';
}
return _react2['default'].createElement(
'select',
props,
options ? this.renderOptions(options, placeholder) : children
_extends({ value: finalValue }, restProps),
options ? this.renderOptions(options, multiple, placeholder) : children
);

@@ -119,0 +119,0 @@ };

{
"name": "react-formalize",
"version": "0.3.0-alpha3",
"version": "0.3.0-alpha4",
"description": "Serialize react forms",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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

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

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