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

alaska-field-password

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alaska-field-password - npm Package Compare versions

Comparing version 0.12.12 to 0.13.0

2

package.json
{
"name": "alaska-field-password",
"version": "0.12.12",
"version": "0.13.0",
"description": "Alaska password field",

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

@@ -32,6 +32,27 @@ // @flow

shouldComponentUpdate(props: Alaska$view$Field$View$Props, state: State) {
return props.disabled !== this.props.disabled || !shallowEqualWithout(state, this.state);
componentWillReceiveProps(nextProps: Alaska$view$Field$View$Props) {
if (nextProps.record._id !== this.props.record._id) {
this.setState({
value1: '',
value2: ''
});
}
}
shouldComponentUpdate(nextProps: Alaska$view$Field$View$Props, state: State) {
return nextProps.disabled !== this.props.disabled
|| nextProps.record._id !== this.props.record._id
|| nextProps.value !== this.props.value
|| !shallowEqualWithout(state, this.state);
}
getError(): string {
const { t } = this.context;
const { value1, value2 } = this.state;
if (value1 !== value2) {
return t('The passwords are not match');
}
return '';
}
handleChange(index: number, e: SyntheticInputEvent<*>) {

@@ -38,0 +59,0 @@ // $Flow e.target.value确认存在

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