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

alaska-field-select

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alaska-field-select - npm Package Compare versions

Comparing version 0.12.11 to 0.12.12

6

package.json
{
"name": "alaska-field-select",
"version": "0.12.11",
"version": "0.12.12",
"description": "Alaska select field",

@@ -15,5 +15,5 @@ "keywords": [

"dependencies": {
"alaska-field-checkbox": "^0.12.10",
"react-select": "^1.2.0"
"alaska-field-checkbox": "^0.12.12",
"react-select": "^1.2.1"
}
}

@@ -14,3 +14,3 @@ // @flow

type State = {
options?: Alaska$SelectField$option[],
options: Alaska$SelectField$option[],
optionsMap: {

@@ -32,3 +32,3 @@ [value: string]: Alaska$SelectField$option,

this.state = {
options: props.options,
options: this.processOptions(props.options),
optionsMap: {},

@@ -55,3 +55,3 @@ };

if (props.options !== this.props.options) {
state.options = props.options;
state.options = this.processOptions(props.options);
state.optionsMap = {};

@@ -78,2 +78,11 @@ if (props.options) {

processOptions(options?: Alaska$SelectField$option[]): Alaska$SelectField$option[] {
return _.map(options || [], (opt) => {
if (typeof opt.style === 'string') {
opt = _.omit(opt, 'style');
}
return opt;
});
}
processValue = (value: any) => {

@@ -175,3 +184,3 @@ let optionsMap = this.state.optionsMap;

// $Flow
options={this.state.options || []}
options={this.state.options}
disabled={disabled}

@@ -178,0 +187,0 @@ placeholder={t('Select...')}

@@ -134,3 +134,3 @@ // @flow

style={{ display: 'inline-block', marginRight: 16 }}
onCheck={() => this.handleCheck(vid)}
onChange={() => this.handleCheck(vid)}
/>);

@@ -137,0 +137,0 @@ })

@@ -9,3 +9,2 @@ // @flow

import Switch from './Switch';
import { getOptionValue } from './utils';

@@ -12,0 +11,0 @@ type State = {

@@ -117,20 +117,18 @@ // @flow

if (field.horizontal === false) {
let labelElement = label ? <label className="control-label">{label}</label> : null;
if (field.horizontal) {
return (
<div className={className}>
{labelElement}
{inputElement}
{helpElement}
<label className="col-sm-2 control-label">{label}</label>
<div className="col-sm-10">
{inputElement}
{helpElement}
</div>
</div>
);
}
return (
<div className={className}>
<label className="col-sm-2 control-label">{label}</label>
<div className="col-sm-10">
{inputElement}
{helpElement}
</div>
{label ? <label className="control-label">{label}</label> : null}
{inputElement}
{helpElement}
</div>

@@ -137,0 +135,0 @@ );

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